[Discuss] The dangers of ASCII mode

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Anti-Spam Guide
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [Discuss] The dangers of ASCII mode

Post by Lumpy Burgertushie »

SuperbQ wrote:Huh? I actually TRIED and TESTED the different settings before writing those facts.
Why bother believing me? Install FileZilla and try it yourself. Takes less than a minute.

Why didn't the developer gray out the group box? Heh, maybe he was lazy. Who cares.
I am curious how you tested whether transferring a plain text file( ascii file ) was changed in any way when transferred in binary and with that box checked or not checked etc

just because the file was transferred and still works does not mean it was not changed during transfer in some way.

Did you also test if transferring the files with no extensions that phpbb creates for the attachments are changed in any way when trnasferred in ascii or binary with the box checked or unchecked etc.

if so, how?

I don't know how to test all of those things for sure and was wondering if you did , or if you just assumed your facts because the files still worked after you transferred them.

thanks,
robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: [Discuss] The dangers of ASCII mode

Post by Pony99CA »

It's not that hard, Robert. There are plenty of file comparison programs out there. I have UltraCompare at home. For my FTP tests, I opened the files in a hex editor and just looked at the pattern that I had created. You could even use the DOS FC (File Compare) command.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
User avatar
callumacrae
Former Team Member
Posts: 2662
Joined: Tue Feb 12, 2008 12:28 pm
Location: London, UK
Name: Callum Macrae
Contact:

Re: [Discuss] The dangers of ASCII mode

Post by callumacrae »

OR just generate an MD5 hash to see whether it has been damaged :P
macr.ae = my website. you probably won't like it.
Proud user ofProud user of
SuperbQ
Registered User
Posts: 7
Joined: Sat Aug 27, 2011 5:40 am

Re: [Discuss] The dangers of ASCII mode

Post by SuperbQ »

t_backoff wrote:
SuperbQ wrote:I actually TRIED and TESTED the different settings before writing those facts.
Why bother believing me? Install FileZilla and try it yourself. Takes less than a minute.
I don't have a board to test this with. ;)
You don't need a board. You simply need some ftp server to test the client w/.
Create and upload an extension-less file, download it back to your computer, and see the connection log regarding the transfer type. Simple as that.

Or... you could also believe me. :P
SuperbQ
Registered User
Posts: 7
Joined: Sat Aug 27, 2011 5:40 am

Re: [Discuss] The dangers of ASCII mode

Post by SuperbQ »

Lumpy Burgertushie wrote:I am curious how you tested whether transferring a plain text file( ascii file ) was changed in any way when transferred in binary and with that box checked or not checked etc
I tested all the combinations.
I've used an extension-less file called test which I created using Notepad++. That file had several lines with UNIX (\n) line endings.
Lumpy Burgertushie wrote:just because the file was transferred and still works does not mean it was not changed during transfer in some way.
I know, that's why I've checked the SHA-1 hash (HashTab is a wonderful Windows plugin). I've also opened the file via Notepad++ to check whether the line endings changed to Windows style (\r\n).
Lumpy Burgertushie wrote:Did you also test if transferring the files with no extensions that phpbb creates for the attachments are changed in any way when trnasferred in ascii or binary with the box checked or unchecked etc.

if so, how?

I don't know how to test all of those things for sure and was wondering if you did , or if you just assumed your facts because the files still worked after you transferred them.

thanks,
robert
Dude, I'm not dumb. I know how to test a program & its settings. I know how to check if a file is bit-to-bit identical (and what has changed if it's not).

To sum up:
Auto + CHECKED "Treat files w/o extension as ASCII file" = ASCII transfer mode when transferring an extension-less file.

Auto + UNCHECKED "Treat files w/o extension as ASCII file" = Binary transfer mode when transferring an extension-less file.

Binary + whatever settings in the "Automatic file classification group box" = Binary transfer mode always.

ASCII + whatever settings in the "Automatic file classification group box" = ASCII transfer mode always.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [Discuss] The dangers of ASCII mode

Post by Lumpy Burgertushie »

never said you were dumb. I was asking for just the information you supplied.

many people would have made the same statements you did, claimed them as facts as you did , without having tested anything other than the fact that the file still worked.

thanks

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: [Discuss] The dangers of ASCII mode

Post by Pony99CA »

Lumpy Burgertushie wrote: many people would have made the same statements you did, claimed them as facts as you did , without having tested anything other than the fact that the file still worked.
Kind of like how you said that selecting the Binary radio button for default transfers wouldn't work without having actually tested FileZilla? ;)

With possibly condescending statements like "just because the file was transferred and still works does not mean it was not changed during transfer in some way", I do have to say that your line of questioning did imply that SuperbQ hadn't done his due diligence. That's not exactly calling him "dumb", just lazy or ignorant. :lol:

And, yes, we're all ignorant about much of the world (and I'm lazy). :twisted:

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [Discuss] The dangers of ASCII mode

Post by Lumpy Burgertushie »

I stand guilty of that, however, I already admitted I did not know how to do those kinds of tests and was simply asking for proof of what he had said. I got it and I am happy now.

thank you for your interpretation of my words, however wrong it may be.
I am sure that others were as confused as I,and apparently you, were.



robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: [Discuss] The dangers of ASCII mode

Post by Martin Truckenbrodt »

Hello,
Since 2002 I've got broken attachments, images and avatars several times by now. :?

One very small improvement to reduce the risc for overwriting good files with bad files on the web server to a minimum:
Just make two root folders for the phpBB installation by default:
  • for the phpBB software itself
  • for all things uploaded by users, backups and so on
Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: [Discuss] The dangers of ASCII mode

Post by Pony99CA »

Martin Truckenbrodt wrote:Hello,
Since 2002 I've got broken attachments, images and avatars several times by now. :?

One very small improvement to reduce the risc for overwriting good files with bad files on the web server to a minimum:
Just make two root folders for the phpBB installation by default:
  • for the phpBB software itself
  • for all things uploaded by users, backups and so on
That actually sounds like a good idea. However, I can't imagine doing that in a phpBB 3.0.x release; it would probably have to be done on a major release boundary (phpBB 3.1, 3.2 or 4.0) where the team will provide a convertor.

I presume that you'd also put styles and languages in that second "root" (it's not really a root, of course, but I get your point).

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
User avatar
tbackoff
Former Team Member
Posts: 7068
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: [Discuss] The dangers of ASCII mode

Post by tbackoff »

How does this prevent overwriting good files with bad files. If I download my attachments in ASCII mode from that second "root" directory, and the re-upload them, the good files will still be overwritten. Changnig the directory of where they are stored doesn't really fix anything.
Flying is the second best thrill to cheerleaders; being caught is the first.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [Discuss] The dangers of ASCII mode

Post by Lumpy Burgertushie »

if they were kept separate from the main phpbb files, there would be no need to download or upload that folder during an update of phpbb etc.

however, if you ever did want to backup that folder ( good idea ) then the same problem would still be there.

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
callumacrae
Former Team Member
Posts: 2662
Joined: Tue Feb 12, 2008 12:28 pm
Location: London, UK
Name: Callum Macrae
Contact:

Re: [Discuss] The dangers of ASCII mode

Post by callumacrae »

Lumpy Burgertushie wrote:if they were kept separate from the main phpbb files, there would be no need to download or upload that folder during an update of phpbb etc.

however, if you ever did want to backup that folder ( good idea ) then the same problem would still be there.

robert
...but then the board would still break...
macr.ae = my website. you probably won't like it.
Proud user ofProud user of
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: [Discuss] The dangers of ASCII mode

Post by Pony99CA »

I think the point is that you could upload the code "root" as all ASCII and the user "root" as all binary. It would make backing up the user content much easier (one download instead of several) or faster (not having to download the code root). It would also make the refresh instructions that support team members publish easier (upload everything in the zip file except for...).

But where would config.php go? The phpBB root, the code root or the user root? (Ideally, NOT the code root.)

Yes, if you download the user root as ASCII, you can still screw things up, but at least you wouldn't really have to worry about AUTO and could encourage using ASCII mode for the code root (to make the code more readable in Windows, at least).

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [Discuss] The dangers of ASCII mode

Post by Lumpy Burgertushie »

I guess the best way is to simply create better instructions here for how to backup your files. Letting people know that you have to be sure what your ftp program is or is not doing.

There are several things that could be explained better to help people understand how to use phpbb properly.

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Locked

Return to “phpBB Discussion”