Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mount_webdav proxy bug



Today I noticed a strange mount_webdav bug: it seemed to ignore the
exception list of the Proxy Setting preference pane.
After some code-digging I discovered that it honors the exception list,
but a nasty bug in the code prevents it from working well.

The guilty code is this, in mount_webdav.c:
------8<---------
start = strlen(dest_server) - strlen(ehost);
if (start > 0)
{
if ((strcmp(&dest_server[start], ehost)) == 0)
{
/* last part of dest_server matches ehost */
proxy_exception = 1;
break;
}
}
------8<---------

It works well when in the exception list there's a domain name (it
compares the suffixes), but it doesn't work with simple host names.
If there's e.g. localhost in both dest_server and ehost it should set
proxy_exception = 1, but it doesn't, as start = 0.

So the correct code should be:

...
if (start >= 0)
{
...

Salvatore Insalaco
R&D Group, S-Lab Italia
Office: +39 02 4567 3672
Mobile: +39 349 7609 440

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.