Sunil Mohan Adapa fbed7e93e8
operation: Use safe formatter for translating messages
- When an app install fails, there is a small chance that the failure message is
show in the area where operation spinner is shown. If that happens,
operation.translated_message is accessed from the HTML template. This throws an
exception if the error message that made contains excepted formatting keys.
Example:
"{include_once("/var/www/html/config/config.php");print($CONFIG["dbpassword"] ??
""); }".

- Also change the formatting key {exception_message} to {exception} as this
would help in translation when Notification is shown which has {exception} as
data dictionary value.

Tests:

- In the operation update message such as 'Installing app', insert unexpected
formatting strings. 'Installing app {foo}'. Notice the error without the patch
and how the patch fixes it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-10-21 12:47:08 -04:00
..
2024-10-16 21:08:29 -07:00
2024-10-07 20:38:12 -04:00
2023-08-23 21:47:39 -04:00
2020-02-19 14:38:55 +02: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