Browse Source

Small bugfixes

prieto 8 years ago
parent
commit
a08b41dfb6
2 changed files with 5 additions and 1 deletions
  1. 1
    0
      plugins/dummy/__init__.py
  2. 4
    1
      plugins/webui/run.py

+ 1
- 0
plugins/dummy/__init__.py View File

7
 __author__ = "Lodel2 dev team"
7
 __author__ = "Lodel2 dev team"
8
 __fullname__ = "Dummy plugin"
8
 __fullname__ = "Dummy plugin"
9
 __name__ = 'yweber.dummy'
9
 __name__ = 'yweber.dummy'
10
+__plugin_type__ = 'extension'
10
 
11
 
11
 
12
 
12
 ##@brief This methods allow plugin writter to write some checks
13
 ##@brief This methods allow plugin writter to write some checks

+ 4
- 1
plugins/webui/run.py View File

44
 #@return None or a session token
44
 #@return None or a session token
45
 def load_cookie(request):
45
 def load_cookie(request):
46
     token = request.cookies.get(COOKIE_SESSION_ID)
46
     token = request.cookies.get(COOKIE_SESSION_ID)
47
-    token=token.encode()
47
+    
48
     if token is None or len(token) == 0:
48
     if token is None or len(token) == 0:
49
         return None
49
         return None
50
+    
51
+    token=token.encode()
52
+    
50
     hashtok = request.cookies.get(COOKIE_SESSION_HASH)
53
     hashtok = request.cookies.get(COOKIE_SESSION_HASH)
51
     if hashtok is None:
54
     if hashtok is None:
52
         raise ClientAuthenticationFailure(
55
         raise ClientAuthenticationFailure(

Loading…
Cancel
Save