-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement session authentication (removing uuid from url) #72
Conversation
- filling the username and password (password saved in database as plaintext)
because we send username and password with base64 encoding, so we're not limited to assci
THEN we check session cookies
chg: g.user and g.admin to g.account
- seperate storing account id in session
|
||
|
||
@event.listens_for(AdminUser, "before_insert") | ||
def before_insert(mapper, connection, target): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ببریم توی baseaccount
@@ -171,6 +174,16 @@ def bulk_register_admins(users=[], commit=True): | |||
|
|||
|
|||
def current_admin_or_owner(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
میدونم خودم نوشتم ولی چرا اخه؟ریسک امنیتی ایجاد میکنه
|
||
|
||
|
||
def has_permission(admin) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
خیلی پرمیژن ها قاطی پاتی شده
else: | ||
values['proxy_path'] = hconfig(ConfigEnum.proxy_path_admin) | ||
|
||
if hiddify.is_api_v1_call(endpoint=endpoint) and 'admin_uuid' not in values: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
این چیه؟
No description provided.