YaBB Community and Support Forum
YaBB Home About YaBB Download YaBB YaBB Support Customize Your Forum Development Contribute to the Project
  Welcome, Guest. Please Login or Register


 
Page Index Toggle Pages: 1
Topic Tools
 
Attached files containing "+" in their names (Read 3,550 times)
 Sep 9th, 2011 at 12:10pm
There are no actions to perform.  

Liviu Lalescu 
YaBB Newbie
*
Offline
Posts: 32


None
Attached files containing "+" in their names
Hello!

I am using YaBB 2.4. A user tried to attach a file whose name contained "+", I could not download it. Had to rename it.

Is there a patch?

Thank you!
« Last Edit: Sep 9th, 2011 at 12:11pm by Liviu Lalescu »  
 
IP Logged  
 Reply #1 - Sep 9th, 2011 at 3:44pm
There are no actions to perform.  
Captain John 
Ex Member


None
Re: Attached files containing "+" in their names
No ... and won't be
 
 
IP Logged  
 Reply #2 - Sep 9th, 2011 at 7:54pm
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: Attached files containing "+" in their names
For what it's worth, I think this should be moved back to the bug section for the development team to decide whether it needs fixing or not.

In my opinion, if you can't view attachments with certain characters in them then there should be a check to disallow them in the first place.

Either that, or there needs to be a fix to the regex to display files with those characters.

I've tested it on my test board and can confirm the issue - so in my opinion there needs to be some way of dealing with it.

I'm assuming it would be an easy fix...
 
 
IP Logged  
 Reply #3 - Sep 10th, 2011 at 12:02am
There are no actions to perform.  
Captain John 
Ex Member


None
Re: Attached files containing "+" in their names
Certain characters should not be allowed in file names and in URLs to prevent hacking websites.  Why allow a special character in a filename, when all that is needed is to rename the file to something that is accepted ?  Simple.

Some idiot would end up naming a file !@$*)_+ or )(*&^%$#@!  WHY would anyone allow such ? or at what character should we stop at ?
« Last Edit: Sep 10th, 2011 at 12:35am by N/A »  
 
IP Logged  
 Reply #4 - Sep 10th, 2011 at 12:49am
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: Attached files containing "+" in their names
Hi CJ,

That's why certain characters are substituted (or, encoded/decoded), and that's why I think it needs fixing. I haven't checked every single character, but the ones I have checked are substituted with an underscore - the plus symbol isn't being substituted with an underscore - that's what is causing issues and is why I believe it needs a simple regex fix.

I guess I agree that it is not really a bug, but it is still something that deserves a little attention...
 
 
IP Logged  
 Reply #5 - Sep 10th, 2011 at 12:53am
There are no actions to perform.  
Captain John 
Ex Member


None
Re: Attached files containing "+" in their names
Why should we regex any character that is not allowed in a filename ?  Shouldn't be there to start with.

Check out http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words

the "+" is not allowed within a Fat32 filename ...  as other characters
« Last Edit: Sep 10th, 2011 at 1:09am by N/A »  
 
IP Logged  
 Reply #6 - Sep 10th, 2011 at 9:21am
There are no actions to perform.  

JonB 
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 3,625
Land of the Blazing Sun!


None
Re: Attached files containing "+" in their names
I wasn't going to comment, but as a server-geek, I now feel I must.

Captain John is dead on about this.  I don't think we should build code that enables features that contravene generally accepted best practices - such as embedding reserved characters into filenames.

Quote:
the "+" is not allowed within a Fat32 filename

If anyone thinks FAT32, is dead, its first cousin - CIFS (Common Internet File System) is the default file system on almost any USB portable drive/stick.  This is because almost ANY other filesystem can read it.
http://technet.microsoft.com/en-us/library/cc939973.aspx

http://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/art...

Its like designing your software to fail. I get this problem all the time with cross platform ports on the other forum I work on.

besides, anyone who wants it can wander over the the magician's mod board and shazaam, a cure will appear.

Just my 2¢ on the matter
Cool


heh - at the moment I don't think we have to worry about it getting fixed anyway  Wink
 
I find your lack of faith disturbing.
jonbservergeek  
IP Logged  
 Reply #7 - Sep 10th, 2011 at 2:30pm
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: Attached files containing "+" in their names
Well, here's the fix if Liviu wants it anyway:

http://www.carsten-dalgaard.dk/cgi-bin/yabb2/YaBB.pl?num=1315609980/2#2
 
 
IP Logged  
 Reply #8 - Sep 10th, 2011 at 2:52pm
There are no actions to perform.  

Liviu Lalescu 
YaBB Newbie
*
Offline
Posts: 32


None
Re: Attached files containing "+" in their names
Forgive me for this request, if it generates problems, but it is a real world problem, in which a user wanted to attach a file named like: "k + k.txt" (without quotes, just a smaller example). On GNU/Linux, "+" is allowed in file names (remember the "/lost+found" default directory?).

Thank you, Derek, for the fix, but it does not work in my case (I tried the above example). I think you treat images, but I was thinking of text or archive attachments.
« Last Edit: Sep 10th, 2011 at 2:53pm by Liviu Lalescu »  
 
IP Logged  
 Reply #9 - Sep 10th, 2011 at 3:05pm
There are no actions to perform.  

JonB 
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 3,625
Land of the Blazing Sun!


None
Re: Attached files containing "+" in their names
@Liviu Lalescu

Quote:
On GNU/Linux, "+" is allowed in file names


And that would be fine, if YaBB only ran on Unix Filesystems, but that is not the case.

I suspect, that if you ask Carsten over on his forum, he may oblige you. Carsten is one of the most knowledgeable YaBB developers and extremely helpful.

If not, I will see if I can root out a solution, there's probably a regex that looks at the filename when CGI is called.   LOL, but I'm not Carstan either!  Tongue

Cool
 
I find your lack of faith disturbing.
jonbservergeek  
IP Logged  
 Reply #10 - Sep 10th, 2011 at 3:34pm
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: Attached files containing "+" in their names
Carsten's already sorted it - it works for images and files now:

http://www.carsten-dalgaard.dk/cgi-bin/yabb2/YaBB.pl?num=1315609980/4#4
 
 
IP Logged  
 Reply #11 - Sep 10th, 2011 at 4:50pm
There are no actions to perform.  

Liviu Lalescu 
YaBB Newbie
*
Offline
Posts: 32


None
Re: Attached files containing "+" in their names
Yes, it works, thank you YaBB team for the help! (helpful as always).
 
 
IP Logged  
 Reply #12 - Sep 10th, 2011 at 6:13pm
There are no actions to perform.  

Liviu Lalescu 
YaBB Newbie
*
Offline
Posts: 32


None
Re: Attached files containing "+" in their names
Yes, thank you, Carsten, and Derek, for bringing this up to Carsten! I think in the past I also used one or more of his patches. I am puzzled that this bug didn't show up until now.
« Last Edit: Sep 10th, 2011 at 6:15pm by Liviu Lalescu »  
 
IP Logged  
 Reply #13 - Sep 10th, 2011 at 8:08pm
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: Attached files containing "+" in their names
So, why was my last post deleted?
 
 
IP Logged  
 Reply #14 - Sep 13th, 2011 at 1:17pm
There are no actions to perform.  

JonB 
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 3,625
Land of the Blazing Sun!


None
Re: Attached files containing "+" in their names
Quote:
Carsten's already sorted it - it works for images and files now:


God bless Carsten  Wink
 
I find your lack of faith disturbing.
jonbservergeek  
IP Logged  
Page Index Toggle Pages: 1
Topic Tools
 

Get Yet another Bulletin Board at SourceForge.net. Fast, secure and Free Open Source software downloads Support This Project BoardMod - YaBB features and templates YaBB Codex - support on installation and usage YaBB Toolbar for your browser

YaBB Facebook Group Page

Vulnerability Scanner

Valid RSS Valid XHTML Valid CSS Powered by Perl
YaBB Chat and Support Community » Powered by YaBB 3.0 Beta!
YaBB Forum Software © 2000-2011. All Rights Reserved.