File name in a file uploaded to group contains escape characters
Please see attached screenshot
#3 Updated by Dominic Giglio about 9 years ago
I've never uploaded a file to our site. Could you tell me exactly the steps you took leading up to this error? Where did you upload the file, what kind of file was it, to which group did you upload it, etc? I want to see if I can reproduce it in my local dev environment.
#6 Updated by Dominic Giglio almost 9 years ago
- File group-file-upload-test.png group-file-upload-test.png added
- Target version changed from 1.4.6 to 1.4.7
I'm moving this to 1.4.7 for now in favor of working on higher priority 1.4.6 issues.
But I did a little testing last night and haven't been able to exactly replicate your original issue.
I uploaded a bunch of different files to the test group I created for testing GES subscription status. I tried with a name, without a name, with a description, without a description and various types of filenames. You can see in the attached screen shot that the most recent document had quotes in the actual filename which caused the name to be escaped with "%22" at the beginning and the end.
I tried *.doc, *.txt, *.rtf and *.pdf and that didn't seem to matter. Can you tell me a little more about your specific file? What filetype was it? Did it have quotes in the name on your machine before you uploaded?
Also, you're screenshot doesn't look exactly like mine. Yours says "Matthew Gold, \"Digital Humanities\" (106.5k)" but my page lists the uploaded files as "FILENAME uploaded by humanshell on DATE." Am I not looking at the correct page? Could you get me a better screenshot that shows more of the page output?
#8 Updated by Matt Gold almost 9 years ago
- File Screen_Shot_2012-10-04_at_2.31.38_AM.png Screen_Shot_2012-10-04_at_2.31.38_AM.png added
- File Screen_Shot_2012-10-04_at_2.30.38_AM.png Screen_Shot_2012-10-04_at_2.30.38_AM.png added
Sure -- it's a PDF file that was uploaded to a group. Screenshots attached.
#11 Updated by Dominic Giglio almost 9 years ago
If we're going to discuss a rewrite of the group-docs plugin can this issue be closed or maybe moved to Not Tracked for now? For the life of me I cannot reproduce this no matter what I do. If this plugin is going to be re-engineered, the problem described above may be taken care of automatically?
#12 Updated by Boone Gorges almost 9 years ago
- Status changed from Assigned to Resolved
This was a pretty straightforward fix, so I went ahead and did it. https://github.com/castiron/cac/commit/6823e550ce451b80be335410862cd057a1aef341
#13 Updated by Dominic Giglio almost 9 years ago
Oh, Son of a B!!
I ALWAYS forget to check bp-custom.php!! I keep forgetting that we have SO much custom code in there and cac-functions.php that I miss the easiest fixes. Thanks for taking care of this for me, it was really becoming annoying to stare at it and know that I just couldn't figure it out or reproduce it. :-)