Skip to content
  • John Hawthorn's avatar
    a7169bf1
    Make sanitize_as_sql_comment more strict · a7169bf1
    John Hawthorn authored
    Though this method was likely never meant to take user input, it was
    attempting sanitization. That sanitization could be bypassed with
    carefully crafted input.
    
    This commit makes the sanitization more robust by replacing any
    occurrances of "/*" or "*/" with "/ *" or "* /". It also performs a
    first pass to remove one surrounding comment to avoid compatibility
    issues for users relying on the existing removal.
    
    This also clarifies in the documentation of annotate that it should not
    be provided user input.
    
    [CVE-2023-22794]
    a7169bf1
    Make sanitize_as_sql_comment more strict
    John Hawthorn authored
    Though this method was likely never meant to take user input, it was
    attempting sanitization. That sanitization could be bypassed with
    carefully crafted input.
    
    This commit makes the sanitization more robust by replacing any
    occurrances of "/*" or "*/" with "/ *" or "* /". It also performs a
    first pass to remove one surrounding comment to avoid compatibility
    issues for users relying on the existing removal.
    
    This also clarifies in the documentation of annotate that it should not
    be provided user input.
    
    [CVE-2023-22794]
Loading