This commit is contained in:
buua436 2025-12-11 12:01:38 +08:00
parent 48f67973f4
commit 59437efb0a
2 changed files with 4 additions and 3 deletions

View file

@ -82,7 +82,8 @@ def _is_sensitive_url(url: str) -> bool:
try:
if settings.GITHUB_OAUTH is not None:
url_val = settings.GITHUB_OAUTH.get("url")
if url_val: oauth_urls.add(url_val)
if url_val:
oauth_urls.add(url_val)
except Exception:
pass
# Feishu OAuth endpoints
@ -90,7 +91,8 @@ def _is_sensitive_url(url: str) -> bool:
if settings.FEISHU_OAUTH is not None:
for k in ("app_access_token_url", "user_access_token_url"):
url_val = settings.FEISHU_OAUTH.get(k)
if url_val: oauth_urls.add(url_val)
if url_val:
oauth_urls.add(url_val)
except Exception:
pass
# Defensive normalization: compare only scheme+netloc+path

View file

@ -13,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import asyncio
import json
import logging
from collections import defaultdict