Page MenuHomePhabricator

Convert some whiny exceptions into quiet MalformedRequest exceptions
ClosedPublic

Authored by epriestley on Aug 16 2016, 9:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 10:42 AM
Unknown Object (File)
Tue, Dec 17, 10:38 AM
Unknown Object (File)
Sun, Dec 8, 11:17 AM
Unknown Object (File)
Wed, Nov 27, 12:56 PM
Unknown Object (File)
Nov 23 2024, 9:27 AM
Unknown Object (File)
Nov 19 2024, 1:59 PM
Unknown Object (File)
Nov 14 2024, 4:40 PM
Unknown Object (File)
Nov 11 2024, 2:59 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Branch
quiet1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 13322
Build 17085: Run Core Tests
Build 17084: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Convert some whiny exceptions into quiet MalformedRequest exceptions.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Aug 16 2016, 10:43 PM
This revision was automatically updated to reflect the committed changes.