[squid-users] sslbump working with 3.4.9 but not in intercept mode?

Amos Jeffries squid3 at treenet.co.nz
Mon Nov 10 13:20:07 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/11/2014 12:25 a.m., Jason Haar wrote:
> On 11/11/14 00:06, Amos Jeffries wrote:
>> Grr, strdup bites again. Backtrace please if you can.
> I'm not a developer, so here's my attempt, let me know if I need to
> do something else
> 

> #3  0x000000000082a6bb in xstrdup () #4  0x00000000006b528c in
> ACLUrlPathStrategy::match(ACLData<char const*>*&,
> ACLFilledChecklist*, ACLFlags&) ()

Aha. Thats great. Thank you.

You have an urlpath_regex ACL test depending on URIs containing paths.
Which is not the case with CONNECT.

The attached patch should fix the crash.

Amos

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iQEcBAEBAgAGBQJUYLt2AAoJELJo5wb/XPRjdVoIAIzRQmx2gWvYs2IuaiUU7uox
qxl8VId/AwixD1abowYJzoWmDxeXn8WSbeQn0hRU7HIEfBzsyW2rG2XLW/SICwPF
2JU8U1cCvuwzaT5Jmw7ofpRCYaLj0qE3D02/eW6NRVR+qXV7qg6aiWZVKqivw2F3
r2OT9hlUTKH8lq3vqn4147UH67slHNvABjDNMhuvNJWvHQZRGMffr31JCM1UhPTK
4LoBRyBQ+QcAEtXhMt0TrQg2pBmpbXXITXVNR6PCF7VHx95zM0sPMeEyA1Px6uBg
1dD2MNKt7Bb8JqqwfKGyZw81wlgm2mcichPFSIQQsYnDYiFvJQ0MM5BP+0OYwYs=
=P8l+
-----END PGP SIGNATURE-----
-------------- next part --------------
=== modified file 'src/acl/UrlPath.cc'
--- src/acl/UrlPath.cc	2013-01-27 17:35:07 +0000
+++ src/acl/UrlPath.cc	2014-11-10 13:10:39 +0000
@@ -25,34 +25,37 @@
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  *
  *
  * Copyright (c) 2003, Robert Collins <robertc at squid-cache.org>
  */
 
 #include "squid.h"
 #include "acl/UrlPath.h"
 #include "acl/Checklist.h"
 #include "acl/RegexData.h"
 #include "HttpRequest.h"
 #include "rfc1738.h"
 
 int
 ACLUrlPathStrategy::match (ACLData<char const *> * &data, ACLFilledChecklist *checklist, ACLFlags &)
 {
+    if (!checklist->request->urlpath.size())
+        return -1;
+
     char *esc_buf = xstrdup(checklist->request->urlpath.termedBuf());
     rfc1738_unescape(esc_buf);
     int result = data->match(esc_buf);
     safe_free(esc_buf);
     return result;
 }
 
 ACLUrlPathStrategy *
 ACLUrlPathStrategy::Instance()
 {
     return &Instance_;
 }
 
 ACLUrlPathStrategy ACLUrlPathStrategy::Instance_;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Segfault_aclUrlPath_mk0.patch.sig
Type: application/octet-stream
Size: 287 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20141111/775255fd/attachment.obj>


More information about the squid-users mailing list