Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special Characters in Filename return 404 #1434

Closed
caffeineflo opened this issue Aug 2, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@caffeineflo
Copy link

commented Aug 2, 2016

I couldn't find this elsewhere and I believe this was working before, so here I am reporting it!

What were you doing?

Created a .gcode file with "[]“ in the filename through S3D and uploaded it via scp to my octoprint.
Tried loading/printing the file resulted in no error message, yet the console gave me this:

packed_libs.js?35d69079:5 http://primary-pi2.local:5000/api/files/local/%5B50Fan%5DTestcube20x20x10_Hole10-ABS.gcode 404 (NOT FOUND)send @ packed_libs.js?35d69079:5ajax @ packed_libs.js?35d69079:5GcodeFilesViewModel.self.removeFile @ packed_app.js?f9e76fc5:1134(anonymous function) @ VM536:3(anonymous function) @ packed_libs.js?35d69079:1020dispatch @ packed_libs.js?35d69079:4y.handle @ packed_libs.js?35d69079:4

This wouldn't be as much of a problem if it wouldn't mess with the delete function.

What did you expect to happen?

File being able to print

What happened instead?

UI: No Error
Console: 404 Not Found

Branch & Commit or Version of OctoPrint

1.2.15 Master Branch

[Can be found in the lower left corner of the web interface.]

Printer model & used firmware incl. version

Marlin 1.1.0 - RC7 + RCBugFix

Browser and Version of Browser, Operating System running Browser

Latest Chrome on latest Mac OS X (non beta)

Link to octoprint.log

http://pastebin.com/jcT2zLHw

Link to contents of terminal tab or serial.log

For whatever reason, serial.log is empty

Link to contents of Javascript console in the browser

http://pastebin.com/gRX9Vhgu

I have read the FAQ.

foosel added a commit that referenced this issue Aug 15, 2016

foosel added a commit that referenced this issue Aug 15, 2016

Make sure uploads folder only has sanitized entries
Should make sure stuff doesn't break when people perform manual
file operations on the uploads folder (e.g. uploading files
that don't match the sanitization scheme).

Should solve #1434
@foosel

This comment has been minimized.

Copy link
Owner

commented Aug 15, 2016

and uploaded it via scp to my octoprint

Please don't do this. When uploading through OctoPrint, OctoPrint will make sure to strip problematic characters from filenames and do some housekeeping it needs to be able to properly operate. You are basically circumventing this, interfered with internal operations and this is what broke stuff here (not only file deletion, but also the internal tracking of metadata). Use the watched folder for uploading via SCP or other means if you don't want to go through the upload API, that's what it's there for. Do not perform manual changes in the uploads folder.

That being said, I just pushed a commit to the maintenance branch (see above) that will take care of sanitizing (and housekeeping) any files in the uploads folder that are not yet sanitized, that should auto-correct such problems in the future on each file list (by renaming and indexing the offending files).

@caffeineflo

This comment has been minimized.

Copy link
Author

commented Aug 15, 2016

@foosel Thanks for taking time to respond. I had a feeling that the scp upload was breaking my setup causing this issue but I wasn't super sure.

Normally I would close this issue now, but as you were kind enough to take care of even the last person trying to break your great system (me) in the maintenance branch, I leave this open until maintenance gets into some release and this issue will be fixed then.
Otherwise, feel free to close!

Thanks again

@foosel

This comment has been minimized.

Copy link
Owner

commented Aug 28, 2016

Commit mentioned above has since been merged to devel as well, closing.

@foosel foosel closed this Aug 28, 2016

@foosel foosel added this to the 1.2.16 milestone Sep 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.