buglwIP - A Lightweight TCP/IP stack - Bugs: bug #30963, httpd suspect behavior

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #30963: httpd suspect behavior

Submitted by:  Jon H. Peterson <jonp>
Submitted on:  Sat 04 Sep 2010 08:53:38 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Invalid
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: Other

Fri 17 Sep 2010 08:17:14 AM UTC, comment #4:

Follow-up comment from Jon Peterson:

I tried to post to this item...not sure it made it or not. Dave is right and
this item should just be closed as no trouble found. I missed the closing }
when I posted it and the problem I thought existed does not. I am not sure how
I convinced myself that it was a problem in the first place. I am sorry for
causing any confusion or bothering anyone. Thanks, Jon

Kieran Mansley <kieranm>
Project Administrator
Fri 17 Sep 2010 06:31:21 AM UTC, comment #3:

Ehrm, this seems kind of strange for some reasons:

a) when v1.3.2 was released, there was no CGI handling in the httpd since I did not merge Dave's code until 2 months later

b) regarding Dave's comment: the "if(i == g_iNumCGIs)" check is within the "if(g_iNumCGIs && g_pCGIs)" section, both in the original post as in the original webserver

-> this means to me that the original bug report is invalid

and finally:
c) 2 months ago, I dropped the code replacing the '?' since I wanted URLs to work with a '?' at the end, no matter if we have CGI support enabled or not (some browsers seem to add a '?' with no parameters following when using an empty INPUT box).

-> this means the bug has nothing to do with 1.4.0 RC1

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 16 Sep 2010 01:17:43 PM UTC, comment #2:

In the light of David Wilson's comments, would anyone like to suggest a patch to sort this problem out?

Kieran Mansley <kieranm>
Project Administrator
Thu 16 Sep 2010 01:17:13 PM UTC, comment #1:

This followup on mailing list on 7th September from Dave Wilson @ Stellaris

Jon,

The "if(i == g_iNumCGIs)" test checks to see if we fell out of the end of the
loop without processing anything. In this case, the URI isn't for one of the
CGI handlers so it's treated normally. Looking at the code you added to the
note, it does seem that the bracing is wrong since this block should occur
within the "if(g_iNumCGIs && g_pCGIs)" section.

Kieran Mansley <kieranm>
Project Administrator
Sat 04 Sep 2010 08:53:38 PM UTC, original submission:

v1.3.2
if the if statement, if(g_iNumCGIs && g_pCGIs), fails, then the if below, if(i == g_iNumCGIs), is problematic (since i was never set by the loop) and the Null that was inserted at params may not be replaced....i supposed this really shouldn't happen, but users do make mistakes (hard to believe). not sure i understand what the if(i == g_iNumCGIs) is supposed to do?
jon

/* Does the base URI we have isolated correspond to a CGI handler? */
if(g_iNumCGIs && g_pCGIs) {
for(i = 0; i < g_iNumCGIs; i++) {
if(strcmp(uri, g_pCGIs[i].pcCGIName) == 0) {
/*
* We found a CGI that handles this URI so extract the
* parameters and call the handler.
*/
count = extract_uri_parameters(hs, params);
uri = g_pCGIs[i].pfnCGIHandler(i, count, hs->params,
hs->param_vals);
break;
}
}

/* Did we handle this URL as a CGI? If not, reinstate the
* original URL and pass it to the file system directly. */
if(i == g_iNumCGIs)
{
/* Replace the ? marker at the beginning of the parameters */
if(params) {
params--;
*params = '?';
}

Jon H. Peterson <jonp>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by kieranm (Posted a comment)
  • -unavailable- added by jonp (Submitted the item)
  • -unavailable- added by jonp
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 17 Sep 2010 06:31:21 AM UTCgoldsimonStatusNone=>Invalid
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Sat 04 Sep 2010 08:53:38 PM UTCjonpCarbon-Copy-=>Added jonp

    Back to the top


    Powered by Savane 3.1-cleanup1