Page MenuHomeDevCentral

Accept notifications in our native format
ClosedPublic

Authored by dereckson on Jan 27 2017, 23:40.
Tags
None
Referenced Files
F3776882: D871.id2274.diff
Sun, Nov 24, 23:40
F3776802: D871.id2287.diff
Sun, Nov 24, 23:20
F3776736: D871.id2270.diff
Sun, Nov 24, 23:08
F3776703: D871.id2282.diff
Sun, Nov 24, 23:01
F3776614: D871.id2288.diff
Sun, Nov 24, 22:55
F3776606: D871.id2275.diff
Sun, Nov 24, 22:55
F3776548: D871.id2214.diff
Sun, Nov 24, 22:43
F3776503: D871.id2278.diff
Sun, Nov 24, 22:36
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 1345
Build 1593: 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 ↗(On Diff #2287)

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.