1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-03 04:02:43 +01:00
phorge-phorge/src/applications/auth/provider
epriestley 95cf83f14e Convert some whiny exceptions into quiet MalformedRequest exceptions
Summary:
Fixes T11480. This cleans up the error logs a little by quieting three common errors which are really malformed requests:

  - The CSRF error happens when bots hit anything which does write checks.
  - The "wrong cookie domain" errors happen when bots try to use the `security.alternate-file-domain` to browse stuff like `/auth/start/`.
  - The "no phcid" errors happen when bots try to go through the login flow.

All of these are clearly communicated to human users, commonly encountered by bots, and not useful to log.

I collapsed the `CSRFException` type into a standard malformed request exception, since nothing catches it and I can't really come up with a reason why anything would ever care.

Test Plan:
Hit each error through some level of `curl -H ...` and/or fakery. Verified that they showed to users before/after, but no longer log.

Hit some other real errors, verified that they log.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11480

Differential Revision: https://secure.phabricator.com/D16402
2016-08-16 15:50:21 -07:00
..
PhabricatorAmazonAuthProvider.php Rename auth classes for consistency 2014-07-22 21:04:13 +10:00
PhabricatorAsanaAuthProvider.php Rename auth classes for consistency 2014-07-22 21:04:13 +10:00
PhabricatorAuthProvider.php Convert some whiny exceptions into quiet MalformedRequest exceptions 2016-08-16 15:50:21 -07:00
PhabricatorBitbucketAuthProvider.php Fix method visibility for PhabricatorBitbucketAuthProvider::getProviderConfigurationHelp() 2015-01-07 07:34:25 +11:00
PhabricatorDisqusAuthProvider.php Rename auth classes for consistency 2014-07-22 21:04:13 +10:00
PhabricatorFacebookAuthProvider.php Rename auth classes for consistency 2014-07-22 21:04:13 +10:00
PhabricatorGitHubAuthProvider.php Rename auth classes for consistency 2014-07-22 21:04:13 +10:00
PhabricatorGoogleAuthProvider.php Rename auth classes for consistency 2014-07-22 21:04:13 +10:00
PhabricatorJIRAAuthProvider.php Write 500 words on how to restart webservers 2015-12-02 09:16:10 -08:00
PhabricatorLDAPAuthProvider.php phtize all the things 2015-05-22 21:16:39 +10:00
PhabricatorOAuth1AuthProvider.php Convert OAuth1 handshake tokens to new modular temporary tokens 2016-03-16 09:34:18 -07:00
PhabricatorOAuth1SecretTemporaryTokenType.php Convert OAuth1 handshake tokens to new modular temporary tokens 2016-03-16 09:34:18 -07:00
PhabricatorOAuth2AuthProvider.php Make auth provider autologin modular and implement it for all OAuth2 adapters 2016-06-06 14:33:09 -07:00
PhabricatorOAuthAuthProvider.php phtize all the things 2015-05-22 21:16:39 +10:00
PhabricatorPasswordAuthProvider.php Merge branch 'master' into redesign-2015 2015-05-22 12:57:32 -07:00
PhabricatorPersonaAuthProvider.php phtize all the things 2015-05-22 21:16:39 +10:00
PhabricatorPhabricatorAuthProvider.php Add a session engine extension point 2016-04-05 15:19:47 -07:00
PhabricatorTwitchAuthProvider.php Rename auth classes for consistency 2014-07-22 21:04:13 +10:00
PhabricatorTwitterAuthProvider.php Rename auth classes for consistency 2014-07-22 21:04:13 +10:00
PhabricatorWordPressAuthProvider.php Rename auth classes for consistency 2014-07-22 21:04:13 +10:00