* feat: implement URL validation to prevent SSRF

* feat: add zip extraction security

* ruff fixes

* fix: standardize error messages across API responses

* fix: improve error handling and standardize error messages across multiple routes

* fix: enhance JavaScript string safety in ConnectorCallbackStatus

* fix: improve OAuth error handling and message formatting in MCPOAuthCallback
This commit is contained in:
Alex
2025-12-25 00:57:25 +00:00
committed by GitHub
parent 197e94302b
commit b0eee7be24
7 changed files with 33 additions and 24 deletions

View File

@@ -462,10 +462,8 @@ class ParseSpec(Resource):
200,
)
except ValueError as e:
error_msg = str(e)
current_app.logger.error(f"Spec validation error: {error_msg}")
return make_response(jsonify({"success": False, "error": error_msg}), 400)
current_app.logger.error(f"Spec validation error: {e}")
return make_response(jsonify({"success": False, "error": "Invalid specification format"}), 400)
except Exception as err:
error_msg = str(err)
current_app.logger.error(f"Error parsing spec: {error_msg}", exc_info=True)
return make_response(jsonify({"success": False, "error": error_msg}), 500)
current_app.logger.error(f"Error parsing spec: {err}", exc_info=True)
return make_response(jsonify({"success": False, "error": "Failed to parse specification"}), 500)