Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    [FIX] SquidGuard "Proxy config" text cutoff/truncation caused by SSL ciphers

    Scheduled Pinned Locked Moved Cache/Proxy
    squidsquidguardsquidproxybug fixes
    1 Posts 1 Posters 189 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JonathanLeeJ
      JonathanLee
      last edited by

      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

      Make sure to upvote

      1 Reply Last reply
      Reply Quote 1

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better ๐Ÿ’—

      Register Login
      • First post
        Last post
      Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
      Privacy Policy · Cookie Policy