Compare commits
2 Commits
0f8f691a3e
...
4a3ab80a35
Author | SHA1 | Date | |
---|---|---|---|
4a3ab80a35 | |||
71c7eac463 |
15
LICENSE
Normal file
15
LICENSE
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
ISC License
|
||||||
|
|
||||||
|
Copyright (c) 2019, iou1name <iou1name@steelbea.me>
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
purpose with or without fee is hereby granted, provided that the above
|
||||||
|
copyright notice and this permission notice appear in all copies.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@ -67,7 +67,7 @@ async def change_password(request):
|
||||||
new_pw = data.get('new_password')
|
new_pw = data.get('new_password')
|
||||||
verify_pw = data.get('verify_password')
|
verify_pw = data.get('verify_password')
|
||||||
|
|
||||||
if not all(current_pw, new_pw, verify_pw):
|
if not all((current_pw, new_pw, verify_pw)):
|
||||||
return
|
return
|
||||||
if not new_pw == verify_pw:
|
if not new_pw == verify_pw:
|
||||||
return
|
return
|
||||||
|
@ -268,6 +268,11 @@ async def get_session(request):
|
||||||
user_id, user_sid)
|
user_id, user_sid)
|
||||||
await conn.close()
|
await conn.close()
|
||||||
|
|
||||||
|
if not data: # user not permitted to use app
|
||||||
|
error = {'error': "you do not have permission to "
|
||||||
|
"access to this application."}
|
||||||
|
return web.json_response(error)
|
||||||
|
|
||||||
data_meta = dict(data)
|
data_meta = dict(data)
|
||||||
data_meta['last_used'] = session['last_used'].isoformat()
|
data_meta['last_used'] = session['last_used'].isoformat()
|
||||||
data_meta['user_sid'] = user_sid
|
data_meta['user_sid'] = user_sid
|
||||||
|
|
Loading…
Reference in New Issue
Block a user