kartoza / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
http://geonode.org/
GNU General Public License v3.0
8 stars 17 forks source link

access_token query string on resource.get_legend.url causes legend image to not appear #189

Closed gubuntu closed 7 years ago

gubuntu commented 7 years ago

From @senoadiw on January 26, 2017 11:4

Description

On recent GeoNode versions, for logged in users the access_token query string is appended to the resource.get_legend.url in https://github.com/GeoNode/geonode/blob/47f2a42ff60be0c0c427b78df5e73a411ac2b2e1/geonode/layers/templates/layers/layer_detail.html#L430

For anonymous users the legend appears fine. Here is what it looks like as admin user:

docker-geonode-qgis legend

Thanks

_Copied from original issue: kartoza/geonode_qgisserver#11

gubuntu commented 7 years ago

From @ismailsunni on January 27, 2017 3:31

Thanks @senoadiw for the report. Well, I haven't tested with the current version of geonode. It seems, they added new code that geoserver-specific. But it doesn't cover QGIS Server, unfortunatelly.

gubuntu commented 7 years ago

From @timlinux on January 29, 2017 21:7

@ismailsunni we should write a regex to strip off the access token before passing the request downstream to QGIS server?

gubuntu commented 7 years ago

From @ismailsunni on January 30, 2017 1:5

Hmm, after looked at the code again, the access token should be ignored since it's a GET parameter and the legend should have been shown.

@timlinux yes, that can work

lucernae commented 7 years ago

duplicate of #190