buglwIP - A Lightweight TCP/IP stack - Bugs: bug #55702, SSI bug

 
 

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

bug #55702: SSI bug

Submitter:  Stanislav <stasgsv>
Submitted:  Tue 12 Feb 2019 11:13:12 AM UTC
Votes: 1
 
Category:  apps Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  None
lwIP version:  Other

Sun 24 Mar 2019 08:48:47 PM UTC, comment #3: 

Pushed, thanks for the patch!

Dirk Ziegelmeier <dziegel>
Group administrator
Fri 01 Mar 2019 02:27:40 PM UTC, comment #2: 

Thanks for posting a fix for this. I had the same problem and it was driving me crazy!

Ben <benst>
Wed 13 Feb 2019 06:42:28 AM UTC, comment #1: 

This bug can be fixed by this:

            /* We found an unexpected character so this is not a tag. Move
             back to idle state. /
            ssi->tag_state = TAG_NONE;
          }

Add this code
#if LWIP_HTTPD_DYNAMIC_FILE_READ && !LWIP_HTTPD_SSI_INCLUDE_TAG
          if ((ssi->tag_state == TAG_NONE)&&(ssi->parsed - hs->file < ssi->tag_index)) {
          for(u16_t i = 0;i < ssi->tag_index;i++) {
          ssi->tag_insert[i] = http_ssi_tag_desc[ssi->tag_type].lead_in[i];
          }
  ssi->tag_insert_len = ssi->tag_index;
  hs->file += ssi->parsed - hs->file;
  hs->left -= ssi->parsed - hs->file;
  ssi->tag_end = hs->file;
  ssi->tag_index = 0;
  ssi->tag_state = TAG_SENDING;
  break;
          }
#endif
          /* Move on to the next character in the buffer */
          ssi->parse_left--;
          ssi->parsed++;

Stanislav <stasgsv>
Tue 12 Feb 2019 11:13:12 AM UTC, original submission:  

LwIP ver 2.1.2
httpd
LWIP_HTTPD_DYNAMIC_FILE_READ = 1
LWIP_HTTPD_SSI_INCLUDE_TAG = 0

if last byte of read buffer is "<" and there are no SSI-tag, then "<" is lossed.
For example html code consist
...somedata <b>anotherdata...
Read to buffer first time
"...somedata <"
and second time
"b>anotherdata..."
the browser will get
...somedata b>anotherdata...

Stanislav <stasgsv>

 

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

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 dziegel (Posted a comment)
  • -email is unavailable- added by benst (Posted a comment)
  • -email is unavailable- added by benst (Voted in favor of this item)
  • -email is unavailable- added by stasgsv (Submitted the item)
  •  

    There is 1 vote 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.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-24 dziegel StatusNone Fixed
        Open/ClosedOpen Closed
    2019-03-01 benst Carbon-Copy- Added benst

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code