fix: escape exception messages in mark_safe calls and fix SQL interpolation #103

Closed
opened 2026-04-05 16:21:42 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Aprazor on 3/23/2026

Multiple XSS and security fixes:

  1. truncate_middle filter: escape first_part/second_part before mark_safe
  2. CustomLinkColumn.render: escape exception in title attribute
  3. render_widget dashboard tag: escape exception message
  4. custom_links tag: escape exception and cl.name in both ungrouped
    and grouped link error paths
  5. core/views.py: use current_database() directly instead of f-string
    interpolation of db_name into SQL
  6. core/jobs.py: guard max(releases) against empty list

Signed-off-by: Aprazors Aprazors@gmail.com

*Originally created by @Aprazor on 3/23/2026* Multiple XSS and security fixes: 1. truncate_middle filter: escape first_part/second_part before mark_safe 2. CustomLinkColumn.render: escape exception in title attribute 3. render_widget dashboard tag: escape exception message 4. custom_links tag: escape exception and cl.name in both ungrouped and grouped link error paths 5. core/views.py: use current_database() directly instead of f-string interpolation of db_name into SQL 6. core/jobs.py: guard max(releases) against empty list Signed-off-by: Aprazors <Aprazors@gmail.com>
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#103