Page MenuHomeDevCentral

Accept notifications in our native format
ClosedPublic

Authored by dereckson on Jan 27 2017, 23:40.
Tags
None
Referenced Files
F3776454: D871.id2289.diff
Sun, Nov 24, 22:30
F3775985: D871.diff
Sun, Nov 24, 20:41
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
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 Not Applicable
Unit
Tests Not Applicable

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.