Page MenuHomeDevCentral

Accept notifications in our native format
ClosedPublic

Authored by dereckson on Jan 27 2017, 23:40.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 13:16
Unknown Object (File)
Sun, Dec 15, 16:11
Unknown Object (File)
Sat, Dec 14, 05:17
Unknown Object (File)
Fri, Dec 13, 23:56
Unknown Object (File)
Thu, Dec 12, 14:50
Unknown Object (File)
Wed, Dec 11, 21:53
Unknown Object (File)
Wed, Dec 11, 21:39
Unknown Object (File)
Wed, Dec 11, 06:55
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.