Page MenuHomeDevCentral

Accept notifications in our native format
ClosedPublic

Authored by dereckson on Jan 27 2017, 23:40.
Tags
None
Referenced Files
F2738838: D871.id2278.diff
Wed, Mar 27, 10:13
Unknown Object (File)
Sat, Mar 23, 02:05
Unknown Object (File)
Fri, Mar 22, 14:40
Unknown Object (File)
Tue, Mar 12, 18:18
Unknown Object (File)
Sat, Mar 9, 07:29
Unknown Object (File)
Sat, Mar 9, 07:29
Unknown Object (File)
Sat, Mar 9, 07:29
Unknown Object (File)
Sat, Mar 9, 07:29
Subscribers
None

Details

Summary

Gate to receive notifications already in our format.

Fixes T979.

Test Plan

Fire a notification

Diff Detail

Repository
rNOTIF Notifications center
Lint
Lint Passed
Unit
No Test Coverage
Branch
notification-gate (branched from master)
Build Status
Buildable 1390
Build 1638: arc lint + arc unit

Event Timeline

dereckson edited edge metadata.

Controller draft

getServiceName should currently be protected

dereckson retitled this revision from WIP: Notifications gate to Accept notifications in our native format.Jan 31 2017, 01:44
dereckson planned changes to this revision.EditedJan 31 2017, 02:29

We need to add minimal checks, because {} payload currently produce a valid notification.

[01:50:16] <None/None> None


{ project: "Nasqueron" } payload produces:
[02:33:32] <Nasqueron/None> None
02:33:33 <Wearg> [DEBUG] Message for unknown group: Nasqueron null


An exception is thrown for Invalid JSON or when the raw payload is a string.

By the way, payloads MUST be protected, at least by an API key, or using the GitHub system.

If not, this a free party flood.

We need to add minimal checks, because {} payload currently produce a valid notification.

[01:50:16] <None/None> None


{ project: "Nasqueron" } payload produces:
[02:33:32] <Nasqueron/None> None
02:33:33 <Wearg> [DEBUG] Message for unknown group: Nasqueron null


An exception is thrown for Invalid JSON or when the raw payload is a string.

Done, will return a HTTP 400 Bad request code.

dereckson added inline comments.
app/Http/Controllers/Gate/GateController.php
124

Hu? This method seems an artefact left while preparing D897.

dereckson marked an inline comment as done.

Remove GateController::getServiceName

By the way, payloads MUST be protected, at least by an API key, or using the GitHub system.

If not, this a free party flood.

This is a more generic problem to solve, just filled as T1147.

This revision is now accepted and ready to land.Jan 31 2017, 23:39
This revision was automatically updated to reflect the committed changes.