You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
giohappy opened this issue
Sep 24, 2021
· 1 comment
· Fixed by #8155
Assignees
Labels
majorA high priority issue which might affect a lot of people or large parts of the codebasesecurityPull requests that address a security vulnerability
When updatelayers is executed Geoserver layers that are new to GeoNode are imported in GeoNode.
Actual Behavior
An error is thrown since list_geofence_layer_rules_xml tries to read Geofence rules, which in general do not exist for Geoserver layers.
Steps to Reproduce the Problem
create a new layer new_layer in Geoserver (import data, uplod, whatever)
run python manage.py updatelayers -f new_layer
the follwoing error is raised:
Traceback (most recent call last):
File "/home/giohappy/dev/ibf/GET-IT/src/geonode/geonode/security/models.py", line 421, in set_permissions
self.set_dirty_state()
File "/home/giohappy/dev/ibf/GET-IT/src/geonode/geonode/security/utils.py", line 163, in __exit__
self._execute_requests()
File "/home/giohappy/dev/ibf/GET-IT/src/geonode/geonode/security/utils.py", line 169, in _execute_requests
self.adapter_requests_map[request["name"]](
File "/home/giohappy/dev/ibf/GET-IT/src/geonode/geonode/security/utils.py", line 75, in purge_rules
self.set_has_committed_changes()
File "/home/giohappy/dev/ibf/GET-IT/src/geonode/geonode/security/utils.py", line 72, in set_has_committed_changes
self.safe_point_rules = self.list_rules(xml=True)
File "/home/giohappy/dev/ibf/GET-IT/src/geonode/geonode/security/utils.py", line 87, in list_rules
rules = list_geofence_layer_rules_xml(workspace, layer_name)
File "/home/giohappy/dev/ibf/GET-IT/src/geonode/geonode/decorators.py", line 57, in wrapper
return func(*args, **kwargs)
File "/home/giohappy/dev/ibf/GET-IT/src/geonode/geonode/security/utils.py", line 489, in list_geofence_layer_rules_xml
if rule.find("layer").text == layer_name:
AttributeError: 'NoneType' object has no attribute 'text'
(.....)
majorA high priority issue which might affect a lot of people or large parts of the codebasesecurityPull requests that address a security vulnerability
Expected Behavior
When updatelayers is executed Geoserver layers that are new to GeoNode are imported in GeoNode.
Actual Behavior
An error is thrown since list_geofence_layer_rules_xml tries to read Geofence rules, which in general do not exist for Geoserver layers.
Steps to Reproduce the Problem
new_layer
in Geoserver (import data, uplod, whatever)python manage.py updatelayers -f new_layer
Specifications
The text was updated successfully, but these errors were encountered: