Not logged in. · Lost password · Register
Forum: Support Bug reports and troubleshooting RSS
Attachment with apostrophe
[Unresolved - not a bug?]
Page:  1  2  next 
Avatar
spaceman #1
Member since Sep 2004 · 295 posts
Group memberships: Members
Show profile · Link to this post
Subject: Attachment with apostrophe
It seems files that contain apostrophe (') once uploaded/attached, will become some_file_name\'s.kar (for example) & therefore it cannot be downloaded properly. Is there any way to prevent this? Thanks :)
BlackBoard > FUDForum > Invision > phpBB2
This post was edited on 2004-09-06, 16:47 by spaceman.
Avatar
Yves (Administrator) #2
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Works for me.
Please read through this forum's top info and don't forget your current board version (I suppose 1.5 in your case), browser, server PHP version etc.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
spaceman #3
Member since Sep 2004 · 295 posts
Group memberships: Members
Show profile · Link to this post
Oh yeah I remember I've been posted a MIDI here which has apostrophe in the Playground forum. I wonder why it doesn't work on my forum.

By the way what do u mean by this forum's top info? And does different browser affect how files are being treat when uploaded?

Thanks..
BlackBoard > FUDForum > Invision > phpBB2
Avatar
Yves (Administrator) #4
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I meant the stuff I wrote to the very top of the Bug report's forum and that is there to keep me from asking the same questions ever again. This is what you can mark as read... (assuming you have already read it ;))

I have no idea if uploading with another browser can change this. Microsoft e.g. is widely known for standards non-compliance, and if it works for me with Firefox and doesn't for your IE, I'll never find the issue if I'm not testing it with your browser, maybe, if that makes the difference. (You could also be using Opera, Safari, Netscape or whatever version I usually don't use.)

For the PHP version: I'm currently almost only testing with PHP5, it could be a PHP4 issue. BTW, you could check all PHP options that have "magic" or "quote" in their name. All of them should be "off". The board tries to work around as good as possible, but maybe I haven't tested it with every weird configuration yet.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
spaceman #5
Member since Sep 2004 · 295 posts
Group memberships: Members
Show profile · Link to this post
I'm sorry but I've to bring this issue to attention again. I've tried uploaded a filename like don't_come_back.mid but it was uploaded as don\'t_come_back.mid that result in improper downloading because upon Saving, the file name would be forum (yes, without an extension) although u could add an extension manually and the file would be working as it's supposed to be.

No I don't think it's an IE issue as I managed to upload a file with apostrophe in its file name without any problem, and Saving the file works too, on this board. However about the magic quote thing, I can't seem to find out since I'm not the admin of my server. And I'm not quite sure if my webhost has PHP4 or 5, but most probably PHP4.

Thank u very much for ur support!! :)
BlackBoard > FUDForum > Invision > phpBB2
Avatar
Yves (Administrator) #6
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
It's hard to find out what causes this. But you can provide me details of your PHP environment. Please create a .php file with this content:
<?php phpinfo(); ?>
and call it from your browser. It will give you the complete settings of your PHP setup. Please give me the names and values of all settings with "magic_quotes" in it so that I can test it with your environment.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
spaceman #7
Member since Sep 2004 · 295 posts
Group memberships: Members
Show profile · Link to this post
Directive            Local value          Master value
magic_quotes_gpc:          On               On
magic_quotes_runtime:    Off               Off
magic_quotes_sybase:     Off               Off
BlackBoard > FUDForum > Invision > phpBB2
Avatar
spaceman #8
Member since Sep 2004 · 295 posts
Group memberships: Members
Show profile · Link to this post
I just notice not only this, the [list ] code tag also causes the same problem where:

[list]
[*]don't didn't doesn't haven't hasn't
[/list]

[list=1]
[*]don\'t didn\'t doesn\'t haven\'t hasn\'t
[/list]

The first listing with a dot type works okay (on my board), but the second one [ list=1 ] (I haven't tested other forms ie. A/i/a/o/+) has problem while processing apostrophe, but this board doesn't have such problem, I manually added the backslash apostrophe \' to the above example listing to reflect my problem on my board...;)
BlackBoard > FUDForum > Invision > phpBB2
This post was edited on 2004-09-23, 14:56 by spaceman.
Avatar
Yves (Administrator) #9
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The list issue has been fixed. But this hasn't been documented as it seems.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
spaceman #10
Member since Sep 2004 · 295 posts
Group memberships: Members
Show profile · Link to this post
Quote by Yves:
The list issue has been fixed. But this hasn't been documented as it seems.

Can I have a patch for this on v1.5.1? Or otherwise tell me which codes should be modified to fix it. Thanks :-)  :-)  :heart:
BlackBoard > FUDForum > Invision > phpBB2
Avatar
Yves (Administrator) #11
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
abbc.cfg.php:471
replace the similar line here with the new one: (the stripslashes() call is new - I hope this was the change...)
  1. 'htmlcont1'  => "stripslashes(\"\$2\").",

It seems I could find the problem with quotes in filenames with magic_quotes_gpc = on. Could you please test the following code change for you: (common.lib.php:76, add this as the 4th 'while' loop)
  1.     while (list ($key, $value) = each ($_FILES))
  2.     {
  3.         $_FILES[$key]['name'] = str_replace('\\\'', '\'', $_FILES[$key]['name']);
  4.         $_FILES[$key]['name'] = str_replace('\\"', '"', $_FILES[$key]['name']);
  5.         $_FILES[$key]['name'] = str_replace('\\\\', '\\', $_FILES[$key]['name']);
  6.     }
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
spaceman #12
Member since Sep 2004 · 295 posts
Group memberships: Members
Show profile · Link to this post
Ok I'll try it now, btw, where is line 471 in abbs.cfg.php?? I'm using Wordpad so how could I find that line? (not counting manually...)
BlackBoard > FUDForum > Invision > phpBB2
Avatar
Yves (Administrator) #13
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
OMG. Please use Notepad at least and enable the status line... It'll tell you the line number.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
spaceman #14
Member since Sep 2004 · 295 posts
Group memberships: Members
Show profile · Link to this post
Ok..!!! The file name with apostrophe issue has been fixed.

But abbc.cfg.php:471 is not the case, the problem still exists!
BlackBoard > FUDForum > Invision > phpBB2
Avatar
Yves (Administrator) #15
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Well, I just checked it here and the line was previously:
  1. 'htmlcont1'  => "\"\$2\".",
and should now be:
  1. 'htmlcont1'  => "stripslashes(\"\$2\").",
and that has resolved the bug.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  next 
Go to forum
This board is powered by the Unclassified NewsBoard software, 20120620-dev, © 2003-2011 by Yves Goergen
Page created in 349 ms (281.4 ms) · 138 database queries in 220.4 ms
Current time: 2013-05-19, 09:50:44 (UTC +02:00)