Page MenuHomeDevCentral

Accept notifications in our native format
ClosedPublic

Authored by dereckson on Jan 27 2017, 23:40.
Tags
None
Referenced Files
F3772337: D871.id2282.diff
Sun, Nov 24, 03:40
Unknown Object (File)
Fri, Nov 22, 09:50
Unknown Object (File)
Fri, Nov 22, 02:33
Unknown Object (File)
Fri, Nov 22, 02:29
Unknown Object (File)
Tue, Nov 19, 15:28
Unknown Object (File)
Tue, Nov 19, 13:48
Unknown Object (File)
Tue, Nov 19, 05:34
Unknown Object (File)
Tue, Nov 19, 05:13
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 1387
Build 1635: 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.