Merge pull request #12271 from alanturing881/fix/stored-xss-ale-piggy-name

Fix stored XSS in audit log view via piggy bank name (ale.twig)
This commit is contained in:
James Cole
2026-05-20 20:16:16 +02:00
committed by GitHub
2 changed files with 8 additions and 2 deletions

View File

@@ -18,6 +18,12 @@ jobs:
steps:
- run: |
BODY=$(gh pr view $NUMBER --json body)
AUTHOR=$(gh pr view $NUMBER --json author)
if [[ $BODY == *"app/dependabot"* ]]; then
echo "Is dependabot, stop"
exit 0
fi
# I used AI assistance for:
# - [ ] Code generation (e.g., when writing an implementation or fixing a bug)

View File

@@ -104,10 +104,10 @@
<code>{{ logEntry.after }}</code>
{% endif %}
{% if 'add_to_piggy' == logEntry.action %}
{{ trans('firefly.ale_action_log_add', {amount: formatAmountBySymbol(logEntry.after.amount, logEntry.after.currency_symbol, logEntry.after.decimal_places, true), name: logEntry.after.piggy})|raw }}
{{ trans('firefly.ale_action_log_add', {amount: formatAmountBySymbol(logEntry.after.amount, logEntry.after.currency_symbol, logEntry.after.decimal_places, true), name: logEntry.after.piggy|e})|raw }}
{% endif %}
{% if 'remove_from_piggy' == logEntry.action %}
{{ trans('firefly.ale_action_log_remove', {amount: formatAmountBySymbol(logEntry.after.amount, logEntry.after.currency_symbol, logEntry.after.decimal_places, true), name: logEntry.after.piggy})|raw }}
{{ trans('firefly.ale_action_log_remove', {amount: formatAmountBySymbol(logEntry.after.amount, logEntry.after.currency_symbol, logEntry.after.decimal_places, true), name: logEntry.after.piggy|e})|raw }}
{% endif %}
</td>