{"record":{"id":"e6ee0a83743dbafa","repo":"apache/superset","slug":"invalid-url-scheme","errorCode":null,"errorMessage":"Invalid URL scheme","messagePattern":"Invalid URL scheme","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"superset/views/redirect.py","lineNumber":69,"sourceCode":"\n    route_base = \"/redirect\"\n\n    @expose(\"/\")\n    def redirect_warning(self) -> FlaskResponse:\n        \"\"\"Validate the target URL and either redirect or show the warning page.\"\"\"\n        if not is_feature_enabled(\"ALERT_REPORTS\"):\n            abort(404)\n\n        target_url = request.args.get(\"url\", \"\").strip()\n\n        if not target_url:\n            abort(400, description=\"Missing URL parameter\")\n\n        # Block dangerous schemes using urlparse for robust detection\n        parsed = urlparse(target_url)\n        if parsed.scheme.lower() in DANGEROUS_SCHEMES:\n            logger.warning(\"Blocked dangerous URL scheme: %s\", target_url[:80])\n            abort(400, description=\"Invalid URL scheme\")\n\n        # Internal URLs redirect immediately\n        if is_safe_redirect_url(target_url):\n            return redirect(target_url)\n\n        # External URLs: render the React warning page\n        return super().render_app_template()\n","sourceCodeStart":51,"sourceCodeEnd":77,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/views/redirect.py#L51-L77","documentation":"Error \"Invalid URL scheme\" thrown in apache/superset.","triggerScenarios":"The redirect endpoint receives a URL with a disallowed scheme.","commonSituations":"Hitting the redirect endpoint with a URL using a disallowed scheme (only http/https permitted).","solutions":["Use an http/https URL; other schemes are rejected by the redirect endpoint."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}