Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit aa2182c

Browse files
author
shin-
committed
clear session whenever auth is invalid
1 parent 6c29b05 commit aa2182c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docker_registry/toolkit.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ def wrapper(*args, **kwargs):
260260
if check_signature() is True or check_token(kwargs) is True:
261261
if 'from' not in session or session['from'] == get_remote_ip():
262262
return f(*args, **kwargs)
263-
else:
264-
session.clear()
263+
session.clear()
265264
headers = {'WWW-Authenticate': 'Token'}
266265
return api_error('Requires authorization', 401, headers)
267266
return wrapper

0 commit comments

Comments
 (0)