Menu

#1691 Python3: /common Security Fixes: isbn.py, navbar.py, authorClass.py, awardClass.py

Approved
open
None
5
2026-02-27
2026-02-27
Al von Ruff
No

isbn.py

  • Fixed bare excepts: clauses (Portability / Readability)
  • Changed the variable 'sum' to 'localSum'. 'sum' is a built-in Python keyword

navbar.py

  • ISFDBText promoted to module-level import; redundant local import in PrintSearchBox removed
  • PrintLoggedIn: username wrapped with ISFDBText()
  • PrintMessagesLink: username URL-encoded in hrefs via Portable_urllib_quote()
  • PrintWikiPointer: submitter URL-encoded in href, HTML-escaped in display text
  • Removed unnecessary return statements

authorClass.py

  • xml2obj: NodeList compared against 0. getElementsByTagName() returns a NodeList, never an integer.
  • Portability: raise-as-control-flow replaced

awardClass.py

  • Portability: raise-as-control-flow replaced
  • Security: award_title output raw to HTML
  • Removed self import of awardClass

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB