Skip to content

Commit ff824b1

Browse files
author
mead
committed
default
1 parent 16e9d88 commit ff824b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GogsWebhook/Http/Controllers/WebHookController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public function handle(Request $request)
2222
if (!$token) {
2323
exit('error request');
2424
}
25-
26-
$json = json_decode(file_get_contents('php://input'), true);
27-
exit($json);
25+
if ($request->header('X-Gogs-Signature', false) !== $token) {
26+
exit('error request');
27+
}
2828
// if (empty($json['token']) || $json['token'] !== $token) {
2929
// exit('error request');
3030
// }

0 commit comments

Comments
 (0)