Changeset - 4cad3a52e0ed
default
0
1
0
auth: return early in LoginRequired on invalid IP
Simplify the code of the LoginRequired decorator by returning early when an
unacceptable condition is met.
Note: the 'return' of redirect_to_login() is not strictly needed since we
should not return from that function (redirection occurs). Adding it,
however, is a security measure in case redirect_to_login does not do what it
should do.
Simplify the code of the LoginRequired decorator by returning early when an
unacceptable condition is met.
Note: the 'return' of redirect_to_login() is not strictly needed since we
should not return from that function (redirection occurs). Adding it,
however, is a security measure in case redirect_to_login does not do what it
should do.
1 file changed with 17 insertions and 28 deletions:
0 comments (0 inline, 0 general)
0 comments (0 inline, 0 general)