Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
phpBB Strange White Space problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
miroR
l33t
l33t


Joined: 05 Mar 2008
Posts: 826

PostPosted: Mon Nov 02, 2015 5:21 pm    Post subject: phpBB Strange White Space problem Reply with quote

title: phpBB Strange White Space problem
---
This (as_posted):

Code:

for h in $(ls -1 *.pcap|sed 's/\.pcap//') ; do for i in $(cat $h.hosts-N) ; do echo $i;  j=$(grep $i $h.hosts); echo $j; read FAKE ; grep $i $h.conv-ip ; sed -i.bak "s/$i/$j/" $h.conv-ip ; read FAKE; diff $h.conv-ip $h.conv-ip.bak ; read FAKE ; done ; done ;

is part of what I posted today at:

SSL Decode & My Hard-Earned Advice for SPDY/HTTP2 in Firefox
https://forums.gentoo.org/viewtopic-t-1029408-start-25.html#7836062

and already it is not workable. The lines that I posted, one at this time, contains a white space character different than what I posted. Truly if in the as_served the chars are replaced to match those in the as_posted, there is no other difference btwn the two files.

While it is probably useless that I post by copying from the already posted and being served from 204.187.15.12 (gossamer-ipvs-forums-v4v6.gentoo.org), the Gentoo server, I'll do it nonetheless, you'll see how I will still get to explain the difference (I hope).

This (as_served):

Code:

for h in $(ls -1 *.pcap|sed 's/\.pcap//') ; do for i in $(cat $h.hosts-N) ; do echo $i;  j=$(grep $i $h.hosts); echo $j; read FAKE ; grep $i $h.conv-ip ; sed -i.bak "s/$i/$j/" $h.conv-ip ; read FAKE; diff $h.conv-ip $h.conv-ip.bak ; read FAKE ; done ; done ;

is what, regardless that it does not look differently, is different from what I posted.

Now please do note that by the time this first post of this topic is served, the difference btwn the as_posted and as_served above is not guarrantied to feature at all! After all readers don't get but the served text to see.

But there are ways, there are ways to explain the issue.

In the first place, how I discovered there is something wrong with how the phpBB serves snippets of texts (or be it that some other influence modifies what I post, all is open for me, and I don't claim anything more that what I write here)...

In the first place, how I discovered there is something wrong with how the phpBB serves snippets of texts is, I decided I needed those lines that I posted in the link given above, and I decided that the phpBB probably serves what I posted, and that I can use those lines to do what I expain in that post, on a batch of PCAP files.

The previous lines I think were probably OK (I'm not sure now that they are, but one, the last, the "longish" line of the post will suffice to explain the problem...

But when I moved my mouse over the last (the "longish") line of the post, in my Dillo browser, to copy the line, and then when I pasted it into my urxvt terminal, and ran it, there were errors, and I couldn't get anything right...


So I'll make two separate files:
Code:

$ ls -l Gen_151102_phpBB_as_????ed.txt
-rw-r--r-- 1 miro miro 259 2015-11-02 17:23 Gen_151102_phpBB_as_posted.txt
-rw-r--r-- 1 miro miro 261 2015-11-02 17:23 Gen_151102_phpBB_as_served.txt
$


Obviously, Gen_151102_phpBB_as_posted.txt is from my system, it is what I prepared on my system for posting, it didn't go over the wires, and also didn't get into my machine back over the wires into my Dillo.

And equally obviously the 2 bytes larger file ...

... Wait a minute, I have to remove one space at the end of the Gen_151102_phpBB_as_served.txt (just before linefeed) ...

And equally obviously the 1 bytes larger file:
Code:

$ ls -l Gen_151102_phpBB_as_????ed.txt
-rw-r--r-- 1 miro miro 259 2015-11-02 17:23 Gen_151102_phpBB_as_posted.txt
-rw-r--r-- 1 miro miro 260 2015-11-02 17:34 Gen_151102_phpBB_as_served.txt
$

and there are no extra spaces at end of lines in either now...

And equally obviously the 1 bytes larger file, the Gen_151102_phpBB_as_served.txt has made the trip to gossamer-ipvs-forums-v4v6.gentoo.org and back, over the wires.

And that one, the as_served one, doesn't do the work. While the original, the as_posted one, does.

Examining these files in hexedit...

You can see for yourself. I posted these two files on:

http://www.croatiafidelis.hr/foss/cap/cap-151102-Gen-phpBB-ws/

The difference is after the ';' character, in this string 'do echo $i;  j=$(grep $i $h.hosts)'.

The first of the two spaces after that ';' column character can be read in as_posted to be, in hexexit, in hex: "20", while in the as_served it can be read to be: "C2A0". That, seems to me, to be the sole difference btwn those two files.

How to address this problem? It's not such an ignorable and unimportant problem, esp. if...

Esp. if it is something others among you Gentooers can reproduce, is it? Or is it something local, maybe caused by very low-budget and incomplete by nice and honest Dillo browser that I like to use (because of it tremendous advantage privacy- and security-wise)?

Regards!

Note: I kind of wonder in what section to post this, and Admins are free to move it elsewhere if my usual section Network and Security is not the right place for this topic.
Back to top
View user's profile Send private message
miroR
l33t
l33t


Joined: 05 Mar 2008
Posts: 826

PostPosted: Mon Nov 02, 2015 5:31 pm    Post subject: Reply with quote

I also thought I'd post ASAP something that I may (but I promise nothing, I
may also not need it) later, here.
Code:

5103ccd8c04e53d6d80860645ff690c994bb7237f91ad3d123e38b49e0cf1ebe  some-file
d5db6bc88d614c5afbfed962672357a78281a78f4080bd8f7e635e66d645725c  some-other-file
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Fri Nov 06, 2015 11:35 pm    Post subject: Reply with quote

Is there an actual question in that mountain of text?
Back to top
View user's profile Send private message
davidm
Guru
Guru


Joined: 26 Apr 2009
Posts: 557
Location: US

PostPosted: Sat Nov 07, 2015 2:14 am    Post subject: Reply with quote

I will take a shot at summarizing this and the highlighting the question for miroR (please correct me if wrong).

He seems to have a problem with whitespace in what is being served by the server.

See http://www.croatiafidelis.hr/foss/cap/cap-151102-Gen-phpBB-ws/

There is a subtle difference between the "as posted" and the "as served" version. The difference seems to make it so the "as served" version is not working while the "as posted" version works. From the link above you can tell by the hash values that there is a difference.

miroR goes on to explain the difference is apparently here:

Code:

'do echo $i;  j=$(grep $i $h.hosts)'


with the semi-colon (;) appearing after the first $i instance in the snippet above. Specifically the whitespace occurring right after that semicolon.

miroR's words about this are reasonably lucid so I will quote the original snippet where he speaks about this:

Quote:

The first of the two spaces after that ';' column character can be read in as_posted to be, in hexexit, in hex: "20", while in the as_served it can be read to be: "C2A0". That, seems to me, to be the sole difference btwn those two files.


miroR's question(s) are:

1. Why is this occurring? (the whitespace discrepancies between the versions posted versus actually served to his browser)
2. Can others here reproduce this problem?
3. What is causing this? Is it perhaps due to his web browser (Dillo)?

I hope this helps.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sat Nov 07, 2015 7:43 am    Post subject: Reply with quote

because of the davidm traduction.

if the question is why my space is not a space?
you should ask yourself: does this exist already? Do a space could not be a space? Or could it be some conspiracy again where someone change my text.... (put some scary music there).

Yes, a space could not be a space in the case where your space need to appears as a space but with a different char in order to identify it's not really a space "only".
This is typically the case of non breakable space.

And if you look at this table, and check what is at the C2A0 value, you'll get?

You should better ask yourself mirroR : how could i takes two posts and lot of words to explain something that davidm has done in 3 phrases.
Back to top
View user's profile Send private message
miroR
l33t
l33t


Joined: 05 Mar 2008
Posts: 826

PostPosted: Sat Nov 07, 2015 5:19 pm    Post subject: Reply with quote

I'll start from replying to only part of the last reply, it may be the quickest part to do.
krinn wrote:
...
You should better ask yourself mirroR : how could i takes two posts and lot of words to explain something that davidm has done in 3 phrases.

Because he is more capable then me. [*]

But let me tell you what the second post is.

And let me remind you that, while I am better today (with my health), I still do work only at turtle-speed. II'm not so very bright to grasp complex things very quickly (esp. since for the first more than 4 decades, 18 yrs ago, of my life I didn't even know any computing).

But let me tell you that the second post is the traffic capture, that I got when I opened Firefox and connected with Firefox to view that same page, to be able to see if the issue does, or does not appear in Firefox. That's the first file, the second is the screencast of the same, short, period of time. Sure I do it with my uncenz (primitive) program.

But I haven't been able to study those yet. But if I do, and find that Firefox doesn't have that problem, than it is probably an issue with Dillo, and this topic will serve to show to Dillo dev the issue. (

And let me mention that I already informed them about similar issue:

[Dillo-dev] Gentoo live ebuild, WAS: Github..cookies
http://lists.dillo.org/pipermail/dillo-dev/2015-September/010642.html

where find a similar issue, just different char instead of not whitespace, but newline:
in Dillo dev ML I wrote:

ou can see it in the comment that I just posted:
https://bugs.gentoo.org/show_bug.cgi?id=554588#c12

The ' ' ...

)

(But there is one compicating factor: I didn't test whether either of these happen or not with the latest stable Dillo, nor with the latest testing Dillo yet.)

---
EDIT 2015-11-07 21:21+01:00:
[*] However, there is also this side: davidm summarizes it more easily because I said more in the first post than he said. He needed not repeat the non anymore relevant details (which would, nobody try to tell they would not, they would be asked, such as where that happaned and such, if I didn't tell those in my, clumsy, first post.)


Last edited by miroR on Sat Nov 07, 2015 8:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
miroR
l33t
l33t


Joined: 05 Mar 2008
Posts: 826

PostPosted: Sat Nov 07, 2015 6:12 pm    Post subject: Reply with quote

krinn wrote:
...
And if you look at this table, and check what is at the C2A0 value, you'll get?

Great link!
Yes, it is the:
Code:
U+00A0 c2 a0 NO-BREAK SPACE


And it is best to test if I got such a char then with Firefox. I hope I'll be able to find those files soon, and then we know more about this issue, or there will be more issues

We'll know more about this issue if I decrypt the said traffic capture, and find or not a no-break space in that place.

But there will be more issues if wireshark-2 hasn't gone stable; I have wireshark-2 installed (and it crashed on me already, the net-analyzer/wireshark-2.0.0_rc2), and/or if there is more of non-decryptable something to deal with...

(
I'd like to just let the readers know that these replies, and esp. the davidm's one, I have to admit is demonstrative of how better to post than I did, it does appear to me to be the case.

I'd like to just let the readers know that these replies come in the wake of these discussions:

Undecipherable posts and a call for moderator action
https://forums.gentoo.org/viewtopic-t-1032278.html
[*]

davidm and krinn posted there too.
)

Regards!

---
EDIT 2015-11-07 21:13+01:00:
[*] (for which nobody will get the Nobel prize)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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