{"record":{"id":"520aa45791ac7801","repo":"phacility/phabricator","slug":"oauth-application-redirect-uris-must-only-use-the","errorCode":null,"errorMessage":"OAuth application redirect URIs must only use the \"http\" or \"https\" protocols, but the URI \"%s\" uses the \"%s\" protocol.","messagePattern":"OAuth application redirect URIs must only use the \"http\" or \"https\" protocols, but the URI \"(.+?)\" uses the \"(.+?)\" protocol\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/oauthserver/PhabricatorOAuthServer.php","lineNumber":219,"sourceCode":"    $uri = new PhutilURI($raw_uri);\n\n    $fragment = $uri->getFragment();\n    if (strlen($fragment)) {\n      throw new Exception(\n        pht(\n          'OAuth application redirect URIs must not contain URI '.\n          'fragments, but the URI \"%s\" has a fragment (\"%s\").',\n          $raw_uri,\n          $fragment));\n    }\n\n    $protocol = $uri->getProtocol();\n    switch ($protocol) {\n      case 'http':\n      case 'https':\n        break;\n      default:\n        throw new Exception(\n          pht(\n            'OAuth application redirect URIs must only use the \"http\" or '.\n            '\"https\" protocols, but the URI \"%s\" uses the \"%s\" protocol.',\n            $raw_uri,\n            $protocol));\n    }\n  }\n\n  /**\n   * If there's a URI specified in an OAuth request, it must be validated in\n   * its own right. Further, it must have the same domain, the same path, the\n   * same port, and (at least) the same query parameters as the primary URI.\n   */\n  public function validateSecondaryRedirectURI(\n    PhutilURI $secondary_uri,\n    PhutilURI $primary_uri) {\n\n    // The secondary URI must be valid.","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/oauthserver/PhabricatorOAuthServer.php#L201-L237","documentation":"Error \"OAuth application redirect URIs must only use the \"http\" or \"https\" protocols, but the URI \"%s\" uses the \"%s\" protocol.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/oauthserver/PhabricatorOAuthServer.php:219 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}