[FIX] SquidGuard "Proxy config" text cutoff/truncation caused by SSL ciphers
-
Hi everyone,
If you are running a modernized Squid setup (like the Squid 7 branch) with heavy SSL/TLS inspection rules, you might have noticed a visual bug where the Proxy config preview box under Services > SquidGuard Proxy Filter > Log abruptly cuts off text right after the cipher suites.
This is a purely cosmetic GUI bug that does not impact your actual proxy operations, but it prevents you from auditing your full configuration file through the web interface.
The Cause
The bug lives in /usr/local/www/squidguard_log.php within the squidguard_prep_textareacont() function.The code uses jQueryโs .html() method to dynamically push the configuration text into the browser layout. Because ssl-bump options are packed with complex raw characters (like !, +, and :), the browser misinterprets the data string as broken HTML formatting and quietly crashes the text rendering.
๏ธ The Simple
FixTo fix this, the script simply needs to handle the incoming configuration string as plain text rather than code instructions. Changing .html() to .text() solves the collision entirely.Open /usr/local/www/squidguard_log.php and update the function around line 115:
Before:
function squidguard_prep_textareacont($cont) { $cont = squidguard_prepfor_JS($cont); return "$('#reportarea').html(\"<br><pre id='pconf' name='pconf' wrap='hard' readonly></pre>\");" . "$('#pconf').html('$cont');"; }After:
function squidguard_prep_textareacont($cont) { $cont = squidguard_prepfor_JS($cont); return "$('#reportarea').html(\"<br><pre id='pconf' name='pconf' wrap='hard' readonly></pre>\");" . "$('#pconf').text('$cont');"; // Fixed here }Once saved, the preview pane immediately processes the entire configuration file flawlessly. Hopefully, this saves someone else some troubleshooting time!
Also helps prevent Cross Site Scripting XSS
Privacy Policy · Cookie Policy