mirror of
https://github.com/haiwen/seahub.git
synced 2025-10-20 18:32:41 +00:00
update (#8152)
This commit is contained in:
@@ -85,13 +85,14 @@ def oauth_check(func):
|
||||
or not REDIRECT_URL or not TOKEN_URL or not USER_INFO_URL \
|
||||
or not SCOPE or not OAUTH_PROVIDER:
|
||||
logger.error('OAuth relevant settings invalid.')
|
||||
logger.error('CLIENT_ID: %s' % CLIENT_ID)
|
||||
logger.error('AUTHORIZATION_URL: %s' % AUTHORIZATION_URL)
|
||||
logger.error('REDIRECT_URL: %s' % REDIRECT_URL)
|
||||
logger.error('TOKEN_URL: %s' % TOKEN_URL)
|
||||
logger.error('USER_INFO_URL: %s' % USER_INFO_URL)
|
||||
logger.error('SCOPE: %s' % SCOPE)
|
||||
logger.error('OAUTH_PROVIDER: %s' % OAUTH_PROVIDER)
|
||||
logger.error('CLIENT_ID_ASSIGNED: %s' % bool(CLIENT_ID))
|
||||
logger.error('AUTHORIZATION_URL_ASSIGNED: %s' % bool(AUTHORIZATION_URL))
|
||||
logger.error('REDIRECT_URL_ASSIGNED: %s' % bool(REDIRECT_URL))
|
||||
logger.error('TOKEN_URL_ASSIGNED: %s' % bool(TOKEN_URL))
|
||||
logger.error('USER_INFO_URL_ASSIGNED: %s' % bool(USER_INFO_URL))
|
||||
logger.error('SCOPE_ASSIGNED: %s' % bool(SCOPE))
|
||||
logger.error('OAUTH_PROVIDER_ASSIGNED: %s' % bool(OAUTH_PROVIDER))
|
||||
logger.error('CLIENT_SECRET_ASSIGNED: %s' % bool(CLIENT_SECRET))
|
||||
error = True
|
||||
|
||||
if error:
|
||||
|
@@ -760,10 +760,10 @@ class SeafileDB:
|
||||
|
||||
path = normalize_file_path(path)
|
||||
sql = f"""
|
||||
select repo_id from `{self.db_name}`.`VirtualRepo` where origin_repo="{original_repo_id}" AND path="{path}"
|
||||
select repo_id from `{self.db_name}`.`VirtualRepo` where origin_repo=%s AND path=%s
|
||||
"""
|
||||
with connection.cursor() as cursor:
|
||||
cursor.execute(sql)
|
||||
cursor.execute(sql, [original_repo_id, path])
|
||||
res = cursor.fetchone()
|
||||
|
||||
return res and res[0] or None
|
||||
|
Reference in New Issue
Block a user