{"record":{"id":"eb4454824fad4e0d","repo":"phacility/phabricator","slug":"oauth-application-redirect-uris-must-not-contain-u","errorCode":null,"errorMessage":"OAuth application redirect URIs must not contain URI fragments, but the URI \"%s\" has a fragment (\"%s\").","messagePattern":"OAuth application redirect URIs must not contain URI fragments, but the URI \"(.+?)\" has a fragment \\(\"(.+?)\"\\)\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/oauthserver/PhabricatorOAuthServer.php","lineNumber":205,"sourceCode":"    } catch (Exception $ex) {\n      return false;\n    }\n  }\n\n  /**\n   * See http://tools.ietf.org/html/draft-ietf-oauth-v2-23#section-3.1.2\n   * for details on what makes a given redirect URI \"valid\".\n   */\n  public function assertValidRedirectURI($raw_uri) {\n    // This covers basics like reasonable formatting and the existence of a\n    // protocol.\n    PhabricatorEnv::requireValidRemoteURIForLink($raw_uri);\n\n    $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,","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/oauthserver/PhabricatorOAuthServer.php#L187-L223","documentation":"Error \"OAuth application redirect URIs must not contain URI fragments, but the URI \"%s\" has a fragment (\"%s\").\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/oauthserver/PhabricatorOAuthServer.php:205 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"}