bugGNUstep - Bugs: bug #41887, +[WebServer matchIP:addr to:pat]...

Group
 
 

bug #41887: +[WebServer matchIP:addr to:pat] always matches single IP address

Submitter:  T.Somequare <tsomeqdev>
Submitted:  Mon 17 Mar 2014 03:43:53 PM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 19 Mar 2014 08:09:07 AM UTC, comment #1: 

Thanks … please check out the 1.5.0 release where a problem in ip address matching should be fixed.

Richard Frith-Macdonald <CaS>
Group Member
Mon 17 Mar 2014 03:43:53 PM UTC, original submission:  


The method WebServer+matchIP:to: seems to be wrong.
[WebServer matchIP:@"1.2.3.4" to:@"4.5.6.7"] returns YES.

I found where a wrong variable name is:
--- WebServer-1.4.6/WebServer.m-edited
+++ WebServer-1.4.6/WebServer.m
@@ -565,7 +565,7 @@
            {
              /* An IPv4 address in dot format (nnn.nnn.nnn.nnn)
               */
-             parts = [pattern componentsSeparatedByString: @"."];
+             parts = [address componentsSeparatedByString: @"."];
              expect = [[parts objectAtIndex: 0] intValue];
              expect = expect * 256 + [[parts objectAtIndex: 1] intValue];
              expect = expect * 256 + [[parts objectAtIndex: 2] intValue];

T.Somequare <tsomeqdev>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by tsomeqdev (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-03-19 CaS StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code