Page MenuHomeDevCentral

Reject requests without X-Hub-Signature when needed
ClosedPublic

Authored by dereckson on Jan 24 2016, 07:07.
Tags
None
Referenced Files
F21126540: D260.id608.diff
Fri, Jan 16, 14:43
F21125828: D260.diff
Fri, Jan 16, 13:33
Unknown Object (File)
Wed, Jan 14, 23:11
Unknown Object (File)
Tue, Jan 13, 17:24
Unknown Object (File)
Fri, Jan 9, 15:02
Unknown Object (File)
Fri, Jan 9, 01:39
Unknown Object (File)
Tue, Jan 6, 15:23
Unknown Object (File)
Tue, Dec 30, 00:54
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.