mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
17 lines
416 B
PHP
17 lines
416 B
PHP
<?php
|
|
// Phase 15 — Slim/Laravel-style route closure, benign.
|
|
// Validates payload before invoking sink.
|
|
|
|
$GLOBALS['__nyx_route'] = function ($payload) {
|
|
if (!preg_match('/^[A-Za-z0-9]{1,32}$/', (string)$payload)) {
|
|
echo "invalid\n";
|
|
return "invalid";
|
|
}
|
|
$out = shell_exec("echo hello");
|
|
echo $out;
|
|
return $out;
|
|
};
|
|
|
|
if (false) {
|
|
$app->get('/run', $GLOBALS['__nyx_route']);
|
|
}
|