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:
+2
-2
@@ -3930,7 +3930,7 @@ class Auth(AuthAPI):
|
||||
return self.has_permission(name, table_name, record_id)
|
||||
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
|
||||
if user logged in is not a member of group_id.
|
||||
@@ -3938,7 +3938,7 @@ class Auth(AuthAPI):
|
||||
group_id is calculated.
|
||||
"""
|
||||
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)
|
||||
|
||||
def accessible_query(self, name, table, user_id=None):
|
||||
|
||||
Reference in New Issue
Block a user