{"action":"created","issue":{"url":"https://api.github.com/repos/OTRS/otrs/issues/728","labels_url":"https://api.github.com/repos/OTRS/otrs/issues/728/labels{/name}","comments_url":"https://api.github.com/repos/OTRS/otrs/issues/728/comments","events_url":"https://api.github.com/repos/OTRS/otrs/issues/728/events","html_url":"https://github.com/OTRS/otrs/pull/728","id":108644169,"number":728,"title":"[ Master - Bug 11132 ] - Loss of attached files with long Cyrillic names","user":{"login":"s7design","id":6348760,"avatar_url":"https://avatars.githubusercontent.com/u/6348760?v=3","gravatar_id":"","url":"https://api.github.com/users/s7design","html_url":"https://github.com/s7design","followers_url":"https://api.github.com/users/s7design/followers","following_url":"https://api.github.com/users/s7design/following{/other_user}","gists_url":"https://api.github.com/users/s7design/gists{/gist_id}","starred_url":"https://api.github.com/users/s7design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s7design/subscriptions","organizations_url":"https://api.github.com/users/s7design/orgs","repos_url":"https://api.github.com/users/s7design/repos","events_url":"https://api.github.com/users/s7design/events{/privacy}","received_events_url":"https://api.github.com/users/s7design/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OTRS/otrs/labels/bugfix","name":"bugfix","color":"fbca04"},{"url":"https://api.github.com/repos/OTRS/otrs/labels/needs%20review","name":"needs review","color":"5319e7"}],"state":"open","locked":false,"assignee":{"login":"carlosfrodriguez","id":223980,"avatar_url":"https://avatars.githubusercontent.com/u/223980?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosfrodriguez","html_url":"https://github.com/carlosfrodriguez","followers_url":"https://api.github.com/users/carlosfrodriguez/followers","following_url":"https://api.github.com/users/carlosfrodriguez/following{/other_user}","gists_url":"https://api.github.com/users/carlosfrodriguez/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosfrodriguez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosfrodriguez/subscriptions","organizations_url":"https://api.github.com/users/carlosfrodriguez/orgs","repos_url":"https://api.github.com/users/carlosfrodriguez/repos","events_url":"https://api.github.com/users/carlosfrodriguez/events{/privacy}","received_events_url":"https://api.github.com/users/carlosfrodriguez/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-09-28T12:03:31Z","updated_at":"2015-12-04T01:46:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OTRS/otrs/pulls/728","html_url":"https://github.com/OTRS/otrs/pull/728","diff_url":"https://github.com/OTRS/otrs/pull/728.diff","patch_url":"https://github.com/OTRS/otrs/pull/728.patch"},"body":"http://bugs.otrs.org/show_bug.cgi?id=11132\r\n\r\nHello @mgruner ,\r\n\r\nHereby is proposal for fixing bug #11132. Would like to elaborate on my research first. \r\n\r\nThere is an issue with long Cyrillic attachment names (around, give or take, 99 characters) when using ArticleStorageFS. Linux limit for file names is 255 bytes. Cyrillic letter takes 2 bytes to encode. Having only file name of 99 chars in Cyrillic is fine, but when using ArticleStorageFS, files that are wrote by it goes over 255 bytes and Linux can't create them. E.g. $Filename.content-type , $Filename.content_alternative , ect. So the end result is that some files are created and some weren't. It gives false result in AgentTicketZoom, showing attachment but essentially without content.\r\n\r\nWith fix all attachment with name more then 100 character, are parsed to 80 chars. Now even with Cyrillic or some other characters that take 2 bytes and some different characters that takes 3 bytes to encode ArticleStorageFS will work.\r\n\r\nAdditionally while working on this bug, found out that attachment that have 2 characters extension were not working when parsed out, so added that as well.\r\n\r\nIf there are any question, issues regarding this PR or you want me to give more details around this problem please let me know.\r\n\r\nRegards,\r\nSanjin"},"comment":{"url":"https://api.github.com/repos/OTRS/otrs/issues/comments/161847740","html_url":"https://github.com/OTRS/otrs/pull/728#issuecomment-161847740","issue_url":"https://api.github.com/repos/OTRS/otrs/issues/728","id":161847740,"user":{"login":"carlosfrodriguez","id":223980,"avatar_url":"https://avatars.githubusercontent.com/u/223980?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosfrodriguez","html_url":"https://github.com/carlosfrodriguez","followers_url":"https://api.github.com/users/carlosfrodriguez/followers","following_url":"https://api.github.com/users/carlosfrodriguez/following{/other_user}","gists_url":"https://api.github.com/users/carlosfrodriguez/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosfrodriguez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosfrodriguez/subscriptions","organizations_url":"https://api.github.com/users/carlosfrodriguez/orgs","repos_url":"https://api.github.com/users/carlosfrodriguez/repos","events_url":"https://api.github.com/users/carlosfrodriguez/events{/privacy}","received_events_url":"https://api.github.com/users/carlosfrodriguez/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T01:46:28Z","updated_at":"2015-12-04T01:46:28Z","body":"Hi @s7design,\r\n\r\nI have 2 topics around this PR.\r\n\r\n1st I see that some lines above there is similar code with different values 95 instead of 70, should we also have to modify that value to 70? or both to 95?\r\n\r\n2nd I run the unit test in Fedora20 and it constantly fails in 4 tests, for example\r\n```\r\nnot ok 175 - FS ArticleAttachmentIndex() Attachment name Japanese 20 characters (\r\nis        '人だけの会員制転職サ人だけの会員制転職サ.txt' \r\nshould be '人だけの会員制転職サ人だけの会員制転職サ.txt'\r\n)\r\n```\r\nBoth strings are similar, so I think it should be a matter of utf-8 flags or so, could you check it?\r\n\r\nthere are no particular error messages, but just at the end\r\n```\r\nERROR: OTRS-otrs.UnitTest-10 Perl: 5.18.2 OS: linux Time: Thu Dec  3 17:39:22 2015\r\n\r\n Message: Can't remove: /Users/Carlos/Dev/OTRS/otrs-5_0/var/article/2015/12/03/4: Directory not empty!\r\n\r\n Traceback (1270): \r\n   Module: Kernel::System::Ticket::ArticleStorageFS::_ArticleDeleteDirectory Line: 1149\r\n   Module: Kernel::System::Ticket::ArticleStorageFS::ArticleDelete Line: 150\r\n   Module: Kernel::System::Ticket::TicketDelete Line: 605\r\n   Module: (eval) Line: 259\r\n   Module: Kernel::System::UnitTest::Run Line: 179\r\n   Module: Kernel::System::Console::Command::Dev::UnitTest::Run::Run Line: 72\r\n   Module: (eval) Line: 436\r\n   Module: Kernel::System::Console::BaseCommand::Execute Line: 430\r\n   Module: Kernel::System::Console::InterfaceConsole::Run Line: 86\r\n   Module: bin/otrs.Console.pl Line: 38\r\n```"}}