diff options
| author | 2021-05-16 14:38:19 +0200 | |
|---|---|---|
| committer | 2021-05-16 14:38:19 +0200 | |
| commit | 9e8a17655a5577e40df544af99e0b8f37a7aa8b4 (patch) | |
| tree | 52c77cc7d24ba4810e0c993bf2912e9d676036c0 /lib | |
| parent | a8561664c99480838364d582e2af947f9c4b456f (diff) | |
Minz provide action name in controller exception (#3624)
Contributes to https://github.com/FreshRSS/FreshRSS/issues/3584
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Minz/ActionException.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Minz/ActionException.php b/lib/Minz/ActionException.php index 311f15086..82f250958 100644 --- a/lib/Minz/ActionException.php +++ b/lib/Minz/ActionException.php @@ -1,7 +1,10 @@ <?php class Minz_ActionException extends Minz_Exception { public function __construct ($controller_name, $action_name, $code = self::ERROR) { - $message = 'Invalid action name for controller ' . $controller_name; + // Just for security, as we are not supposed to get non-alphanumeric characters. + $action_name = rawurlencode($action_name); + + $message = "Invalid action name “${action_name}” for controller “${controller_name}”."; parent::__construct ($message, $code); } } |
