Sunil Mohan Adapa f456a58118
utils: Improve safe formatter by handling more cases
Fixes: #2462.

- When there are field retrievals and subscript based retrievals in the format
string, exceptions are raised. Handle these safely.

- This eliminates are error such as "Notification missing required key during
translation: 'str' object has no attribute 'php");print($CONFIG'". when the
notification message contains
"{include_once("/var/www/html/config/config.php");print($CONFIG["dbpassword"] ??
""); }"

Tests:

- Updated unit tests pass.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-10-21 12:47:04 -04:00
..
2024-10-16 21:08:29 -07:00
2024-10-07 20:38:12 -04:00
2024-03-16 09:17:35 +02:00
2024-10-16 21:07:54 -07:00
2024-03-16 09:17:35 +02:00
2024-10-16 21:08:29 -07:00