user signature is not working well. Not Authorized

35 views
Skip to first unread message

cdbaron

unread,
Feb 6, 2021, 5:45:03 PM2/6/21
to web2py-users

Hi there,

When a signed url has a list of int values it is not working well and I get "Not Authorized"
Here is an example, link1 does not work, link2 works.

@auth.requires_login()
def index():
    link1 = A(
        'link1 Not Authorized :-(',
        _href=URL(f='hello1', vars=dict(ids=[8, 28]), user_signature=True)
    )
    link2 = A(
        'link2',
        _href=URL(f='hello2', vars=dict(ids=[28]), user_signature=True)
    )
    return locals()

@auth.requires_signature()
def hello1():
    return dict(hello='Hello 1')

@auth.requires_signature()
def hello2():
    return dict(hello='Hello 2')


Has anyone had this problem?
I am using the latest version of web2py (Version 2.21.1-stable+timestamp.2020.11.27.18.21.43)
Reply all
Reply to author
Forward
0 new messages