{"action":"created","issue":{"url":"https://api.github.com/repos/instructure/canvas-lms/issues/652","labels_url":"https://api.github.com/repos/instructure/canvas-lms/issues/652/labels{/name}","comments_url":"https://api.github.com/repos/instructure/canvas-lms/issues/652/comments","events_url":"https://api.github.com/repos/instructure/canvas-lms/issues/652/events","html_url":"https://github.com/instructure/canvas-lms/pull/652","id":92223929,"number":652,"title":"Properly escape filenames with slashes on local storage","user":{"login":"grahamb","id":146111,"avatar_url":"https://avatars.githubusercontent.com/u/146111?v=3","gravatar_id":"","url":"https://api.github.com/users/grahamb","html_url":"https://github.com/grahamb","followers_url":"https://api.github.com/users/grahamb/followers","following_url":"https://api.github.com/users/grahamb/following{/other_user}","gists_url":"https://api.github.com/users/grahamb/gists{/gist_id}","starred_url":"https://api.github.com/users/grahamb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grahamb/subscriptions","organizations_url":"https://api.github.com/users/grahamb/orgs","repos_url":"https://api.github.com/users/grahamb/repos","events_url":"https://api.github.com/users/grahamb/events{/privacy}","received_events_url":"https://api.github.com/users/grahamb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/instructure/canvas-lms/labels/Waiting:%20Contributor","name":"Waiting: Contributor","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-06-30T23:25:12Z","updated_at":"2015-10-06T20:12:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/instructure/canvas-lms/pulls/652","html_url":"https://github.com/instructure/canvas-lms/pull/652","diff_url":"https://github.com/instructure/canvas-lms/pull/652.diff","patch_url":"https://github.com/instructure/canvas-lms/pull/652.patch"},"body":"When using local storage instead of S3, having a course short name with\r\na slash in it will cause an error (No such file or directory @\r\nrb_sysopen) when trying to export the Gradebook as a CSV. attachment_fu\r\nis receiving the slash as part of the file path, and erroring out\r\nbecause it can't find the file.\r\n\r\nThis change moves the sanitize_filename method out of the attachment\r\nmodel and into s3_backend. It also addes a different, local-storage\r\nspecific sanitize_filename method to file_system_backend.\r\n\r\nThis change also reverts cf341a4, which fixed this bug in\r\ngradebook_csvs_controller (#640).\r\n\r\nA CLA is on file under my employer, Simon Fraser University\r\n(github.com/sfu).\r\n\r\nTest plan:\r\n\r\nenable local storage for canvas\r\ncreate a course with a slash in the short name (e.g. CHEM 121 / CHEM\r\n122)\r\nattempt to export the gradebook\r\nensure the gradebook file was exported and downlaoded correctly\r\n"},"comment":{"url":"https://api.github.com/repos/instructure/canvas-lms/issues/comments/145984695","html_url":"https://github.com/instructure/canvas-lms/pull/652#issuecomment-145984695","issue_url":"https://api.github.com/repos/instructure/canvas-lms/issues/652","id":145984695,"user":{"login":"grahamb","id":146111,"avatar_url":"https://avatars.githubusercontent.com/u/146111?v=3","gravatar_id":"","url":"https://api.github.com/users/grahamb","html_url":"https://github.com/grahamb","followers_url":"https://api.github.com/users/grahamb/followers","following_url":"https://api.github.com/users/grahamb/following{/other_user}","gists_url":"https://api.github.com/users/grahamb/gists{/gist_id}","starred_url":"https://api.github.com/users/grahamb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grahamb/subscriptions","organizations_url":"https://api.github.com/users/grahamb/orgs","repos_url":"https://api.github.com/users/grahamb/repos","events_url":"https://api.github.com/users/grahamb/events{/privacy}","received_events_url":"https://api.github.com/users/grahamb/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T20:12:57Z","updated_at":"2015-10-06T20:12:57Z","body":"@claydiffrient I'm updating my branch with the latest master and I'll take a look."}}