Page MenuHomeDevCentral

Reject requests without X-Hub-Signature when needed
ClosedPublic

Authored by dereckson on Jan 24 2016, 07:07.
Tags
None
Referenced Files
F6997599: D260.diff
Fri, Apr 18, 21:49
Unknown Object (File)
Wed, Apr 16, 17:42
Unknown Object (File)
Wed, Apr 16, 13:42
Unknown Object (File)
Tue, Apr 15, 17:23
Unknown Object (File)
Tue, Apr 15, 11:32
Unknown Object (File)
Sat, Apr 12, 09:54
Unknown Object (File)
Thu, Apr 10, 03:06
Unknown Object (File)
Mon, Apr 7, 20:02
Subscribers

Details

Summary

A request to /gate/GitHub/<service with secret defined> must has
a X-Hub-Signature header, so we can directly consider not legit
those without.

This fixes the following exception:

ErrorException in XHubSignature.php line 83:
hash_equals(): Expected user_string to be a string, null given
Test Plan

Fire a Phabricator payload to /gate/GitHub/<door with secret>

Diff Detail

Repository
rNOTIF Notifications center
Lint
Lint Passed
Unit
No Test Coverage
Branch
T695

Event Timeline

dereckson retitled this revision from to Reject requests without X-Hub-Signature when needed.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson added inline comments.
app/Http/Controllers/Gate/GitHubGateController.php
130

"signature is missing" or "no signature is included"

131

… perform any other validation

dereckson marked 2 inline comments as done.
dereckson edited edge metadata.

Improve code comment

dereckson edited edge metadata.
This revision is now accepted and ready to land.Jan 24 2016, 07:11
This revision was automatically updated to reflect the committed changes.