Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Random Code: Possibly Caused by Smarty?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
machnhed1
Smarty Regular


Joined: 21 Apr 2003
Posts: 39
Location: Illinois

PostPosted: Thu Feb 10, 2005 4:50 pm    Post subject: Random Code: Possibly Caused by Smarty? Reply with quote

Hi,

I'm trying to trouble shoot this error that we are encountering on one of our machines. If you visit the page http://www.boundlessgallery.com/customer/categories/273/Photographs/ you should see a series of photographs with titles of each, however, on one of our machines (and only one) it displays the following (this is only part of the pages code):

Code:

r.gif" height="35" width="1">
            <table border="0" cellpadding="0"
cellspacing="0">
               <tr>
                  <td>
                     <table width="175"
border="0" cellspacing="0" cellpadding="0">
                        <tr>
                           <td>
32
<table border="0" cellpadding="0" cellspacing="0"
a
width=100%
cf
>
   <tr>
      <td style="border:1px solid #dddddd;" colspan="2">
         <table border="0" cellpadding="0" cellspacing="0"
width="100%">
            <tr>
               <td style="padding:3px;border:1px
solid #ffffff;border-right:0px;
19
background-color:#fbfaf2;
6d
" valign="middle">
                  <table border="0"
cellpadding="0" cellspacing="0" width="100%">
                     <tr>
                        
26
                        <td
width="100%" align="left">
2
<s
18
pan class="form_header">


The code shows up as plain text in the browser and you'll also notice there is random code inserted (e.g. 32, 19, cf, 2).

This may have nothing to do with smarty, but if anyone has an alternative explanation (i.e. firewall, plugin, virus) I open to it.

TIA
_________________
"Every operating system out there is about equal in the number of vulnerabilities reported. We all suck."

- Microsoft Senior Vice President Brian Valentine
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Feb 10, 2005 5:26 pm    Post subject: Reply with quote

to me this looks like artefacts of chunked http encoding.
see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1
(they know this stuff much better than me Smile )

this may happen if the webserver delivers the body with "Transfer-encoding: chunked" but the client doesn't honor the Transfer-encoding-header and doesn't decode the chunked encoding.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
machnhed1
Smarty Regular


Joined: 21 Apr 2003
Posts: 39
Location: Illinois

PostPosted: Thu Feb 10, 2005 7:54 pm    Post subject: Reply with quote

Not sure if that is the case, because if the user on the same machine trys to browse this category (which runs the exact same code except that it is pulling information about a different category): http://www.boundlessgallery.com/customer/categories/521/Prints/ the page works as designed.
_________________
"Every operating system out there is about equal in the number of vulnerabilities reported. We all suck."

- Microsoft Senior Vice President Brian Valentine
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Feb 10, 2005 9:13 pm    Post subject: Reply with quote

It only happens on one machine? What kind of machine? OS? Browser?

I wonder if it is simply suffering a flakey network connection or other hardware issue. How does that machine perform overall? FWIW, the site looked fine from here, too.
Back to top
View user's profile Send private message
machnhed1
Smarty Regular


Joined: 21 Apr 2003
Posts: 39
Location: Illinois

PostPosted: Thu Feb 10, 2005 9:20 pm    Post subject: Reply with quote

Yeah, just one machine running Win XP Pro. Its a smoking workstation with raid, dual proc, etc.. I'm still of the mindset that it is something unique to the machine.

Thanks for taking a look at the pages.

Here's another interesting tid-bit, the machine also has problems regardless of whether I am using IE or Firefox.
_________________
"Every operating system out there is about equal in the number of vulnerabilities reported. We all suck."

- Microsoft Senior Vice President Brian Valentine
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Fri Feb 11, 2005 2:11 am    Post subject: Reply with quote

hmm. I've checked it now with IE on w2k and Firefox on Debian and it looks fine on both (btw, nice site design). I would consider checking out the hardware and drivers a bit more closely. Did you try turning off encoding at the server to see if that makes any difference?
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Fri Feb 11, 2005 8:29 am    Post subject: Reply with quote

maybe that machine where it's not working does use a proxy that is buggy? some webcache? some anti-virus-web-filter? some ad-filter?

what you posted *really* looks like chunked encoding:

Code:
32
<table border="0" cellpadding="0" cellspacing="0"


0x32 is 50 decimal, so 50 bytes will follow. the line contains 50 characters

Code:
a
width=100%


0xa (10) so 10 bytes will follow - correct

Code:

cf
>
   <tr>
      <td style="border:1px solid #dddddd;" colspan="2">
         <table border="0" cellpadding="0" cellspacing="0"
width="100%">
            <tr>
               <td style="padding:3px;border:1px
solid #ffffff;border-right:0px;


0xcf should be 207 bytes, but i count 230. either something got scrambled here by copy+paste (phpbb is not good for transporting data byte-by-byte Smile ), or the encoding is broken.

Code:
19
background-color:#fbfaf2;

0x19 (25 bytes, looks good).


chunked encoding is a transport encoding for http, it should be absolutely transparent to the client.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP