Page MenuHomeDevCentral

Reject requests without X-Hub-Signature when needed
ClosedPublic

Authored by dereckson on Jan 24 2016, 07:07.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 23:28
Unknown Object (File)
Mon, Apr 15, 05:15
Unknown Object (File)
Mon, Apr 15, 04:03
Unknown Object (File)
Sun, Apr 14, 07:10
Unknown Object (File)
Sun, Apr 14, 01:30
Unknown Object (File)
Sun, Apr 14, 01:29
Unknown Object (File)
Wed, Apr 10, 11:46
Unknown Object (File)
Wed, Apr 10, 11:01
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 Not Applicable
Unit
Tests Not Applicable

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.