Add hash_extension variable
Add hash_extension variable to requires_signature function so URL _signature can be verified ignoring the given request extension.
This commit is contained in:
1 parent
d51de88096
commit
d13c5349b6
1 file changed
+2
-2
+2
-2
@@ -3930,7 +3930,7 @@ class Auth(AuthAPI):
|
|||||||
return self.has_permission(name, table_name, record_id)
|
return self.has_permission(name, table_name, record_id)
|
||||||
return self.requires(has_permission, otherwise=otherwise)
|
return self.requires(has_permission, otherwise=otherwise)
|
||||||
|
|
||||||
def requires_signature(self, otherwise=None, hash_vars=True):
|
def requires_signature(self, otherwise=None, hash_vars=True, hash_extension=True):
|
||||||
"""
|
"""
|
||||||
Decorator that prevents access to action if not logged in or
|
Decorator that prevents access to action if not logged in or
|
||||||
if user logged in is not a member of group_id.
|
if user logged in is not a member of group_id.
|
||||||
@@ -3938,7 +3938,7 @@ class Auth(AuthAPI):
|
|||||||
group_id is calculated.
|
group_id is calculated.
|
||||||
"""
|
"""
|
||||||
def verify():
|
def verify():
|
||||||
return URL.verify(current.request, user_signature=True, hash_vars=hash_vars)
|
return URL.verify(current.request, user_signature=True, hash_vars=hash_vars, hash_extension=True)
|
||||||
return self.requires(verify, otherwise)
|
return self.requires(verify, otherwise)
|
||||||
|
|
||||||
def accessible_query(self, name, table, user_id=None):
|
def accessible_query(self, name, table, user_id=None):
|
||||||
|
|||||||
Reference in new issue
Block a user