Skip to content

Funky filename causing Internal Error 1061 on Mac #2777

Closed

Description

@grahams

Expected behaviour

File with funky characters in filename should sync correctly

Actual behaviour

File with funky characters in filename completely breaks owncloud with
internal error 1061. Entire sync fails, not just the single file.

Steps to reproduce

  1. Create file named Michelle Jenneke - rain.gif (Strange character is after the last 'e' in Michelle, EFBBBF)
  2. Copy to ownCloud directory

Here is the filename in hex:
4D 69 63 68 65 6C 6C 65 EF BB BF 20 4A 65 6E 6E 65 6B 65 20 2D 20 72 61 69 6E 2E 67 69 66

Server configuration

(I do not maintain this ownCloud server. If this information is necessary I
can probably obtain it)

Client configuration

Client version: 1.7.1

Operating system: OSX v10.10.2

OS language: English

Installation path of client: /Applications/ownCloud.app

Logs

https://gist.github.com/29e19325ce8db6fe7c38

Gist doesn't seem to have liked how large the logfile was, so here is a gzip of it:
https://ice-nine.org/owncloud/public.php?service=files&t=0b2c5567e4de986cdb58b852fb2b7845

Activity

  1. ogoffart commented on Feb 4, 2015

    @ogoffart
    Contributor

    Most likely the same problem as #2240 (which should probably not have been closed)

    It is because iconv on macOSX fail to convert string that contains some special unicode character . Which means that the filename would be NULL which would be seen by scync as out of memory, and would then abort the update phase.

  2. added this to the 1.8.1 - Bugfix milestone on Feb 4, 2015
  3. guruz commented on Feb 6, 2015

    @guruz
    Contributor

    @ogoffart Would my proposal to use Qt's dir listing methods and hooking them into csync_update (just like the remote ones) help?

  4. ogoffart commented on Feb 6, 2015

    @ogoffart
    Contributor

    @guruz: i think so, yes

  5. self-assigned this
    on Mar 27, 2015
  6. modified the milestones: , 1.8.1 - Bugfix on Apr 8, 2015
  7. thorleifjacobsen commented on Aug 4, 2015

    @thorleifjacobsen

    Adding information here:

    Got 1062 when syncing a mp3 file, did some tracking to find which file it was this was the info i got of it:
    Debugging:

    Filename: The Wanted - Glad You Came (DJ Marley D Club Mix).mp3
    Strlen: 56
    Fetching part after 'U' in You and befoce 'C' in Come
    Troubled part: 
    Strlen of that: 4 characters between U and C.. Wierd..
    1: ? ASCII: 239
    2: ? ASCII: 187
    3: ? ASCII: 191
    4: ASCII: 32
    The last one are a regulare space, so 3 characters between 'U' and the space shown before 'C'

    Edit: Ascii table showing what thoose "should" be: http://www.theasciicode.com.ar/extended-ascii-code/acute-accent-ascii-code-239.html

    Removing 239, 187 and 191 makes it work :)

  8. guruz commented on Aug 4, 2015

    @guruz
    Contributor

    file_stat->name = c_utf8_from_locale(dirent->d_name);

    The problem is indeed as @ogoffart said that this returns null while dirent->d_name is non-null..

  9. thorleifjacobsen commented on Aug 4, 2015

    @thorleifjacobsen
  10. guruz commented on Aug 5, 2015

    @guruz
    Contributor

    @Toffe87 The contents of the file do not matter, just the name :)

    We have a 2.0 nightly available that should show a nice error with the failing filename
    http://download.owncloud.com/desktop/daily/ownCloud-2.0.0.2602-nightly20150805.pkg

    Please test..

  11. added
    ReadyToTest
    on Aug 5, 2015
  12. thorleifjacobsen commented on Aug 6, 2015

    @thorleifjacobsen

    It's the name I've been debugging. Should it really show an error instead of accepting it's name and upload it? I mean, is the solution really to wrap the error in a nice package? :-)

    On 05 Aug 2015, at 18:44, Markus Goetz [email protected] wrote:

    @Toffe87 The contents of the file do not matter, just the name :)

    We have a 2.0 nightly available that should show a nice error with the failing filename
    http://download.owncloud.com/desktop/daily/ownCloud-2.0.0.2602-nightly20150805.pkg

    Please test..

    —
    Reply to this email directly or view it on GitHub.

  13. guruz commented on Aug 6, 2015

    @guruz
    Contributor

    @Toffe87 I would also have prefered to ignore the file, but I was over-voted by @danimo ..
    The respective UTF8 sequence is a byte-order marker, which has nothing to do in a filename.

    https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8

  14. guruz commented on Aug 6, 2015

    @guruz
    Contributor

    @Toffe87 Would you still be willing to test the build?

  15. Dianafg76 commented on Aug 7, 2015

    @Dianafg76

    @guruz, I tested this issue with Desktop vownCloud-2.0.0.2605-nightly20150806.pkg, Server v {"installed":true,"maintenance":false,"version":"8.1.0.8","versionstring":"8.1 RC2","edition":"Enterprise"}.

    And when I used the same file The Wanted - Glad You Came (DJ Marley D Club Mix).mp3, now it is not appears internal error server, but in the .log say this:

    08-07 08:51:51:461 0x7fd5d2f04480 OCC::SocketApi::command_RETRIEVE_FILE_STATUS: void OCC::SocketApi::command_RETRIEVE_FILE_STATUS(const QString &, QIODevice *) "/Users/Diana/user7/ascii/The Wanted - Glad You Came (DJ Marley D Club Mix).mp3"
    08-07 08:51:51:461 0x7fd5d2f04480 OCC::SocketApi::fileStatus: OCC::SyncFileStatus OCC::SocketApi::fileStatus(OCC::Folder *, const QString &, c_strlist_t *) Could not determine state for file "ascii/The Wanted - Glad You Came (DJ Marley D Club Mix).mp3" will set STATUS_NEW
    08-07 08:51:51:462 0x7fd5d2f04480 OCC::SocketApi::sendMessage: SocketApi: Sending message: "STATUS:NEW:/Users/Diana/user7/ascii/The Wanted - Glad You Came (DJ Marley D Club Mix).mp3"

    And the icon it is blue-to-be-sync
    screen shot 2015-08-07 at 08 58 25

  16. removed
    ReadyToTest
    on Aug 7, 2015
  17. guruz commented on Aug 7, 2015

    @guruz
    Contributor

    Does the UI properly display an error for this filename ? Incl full path?

  18. Dianafg76 commented on Aug 7, 2015

    @Dianafg76

    No,I see this in Option Activity
    screen shot 2015-08-07 at 09 08 13

  19. guruz commented on Aug 7, 2015

    @guruz
    Contributor

    @Dianafg76 Thanks for catching. It regressed because of ce5be89

  20. added
    ReadyToTest
    on Aug 10, 2015
  21. Dianafg76 commented on Aug 10, 2015

    @Dianafg76

    @guruz Hello, I tested this issue with ownCloud-2.0.0.2613beta1.pkg.

    And when I used the same file The Wanted - Glad You Came (DJ Marley D Club Mix).mp3, now it is appears this error: "Invalid characters, please rename "/users/Diana/user20beta1/The Wanted - Glad You Came......""

    This is the .log:
    08-10 10:59:15:626 0x7f83953c1ac0 _csync_detect_update: file: Photos/Squirrel.jpg, instruction: INSTRUCTION_NONE <<=
    08-10 10:59:15:626 0x7f83953c1ac0 csync_ftw: <= Closing walk for /Users/Diana/user20beta1/Photos with read_from_db 0
    08-10 10:59:15:626 0x7f83953c1ac0 csync_vio_local_readdir: Invalid characters in file/directory name, please rename: "The Wanted - Glad You Came (DJ Marley D Club Mix).mp3" (/Users/Diana/user20beta1)
    08-10 10:59:15:626 0x7f83953c1ac0 csync_statedb_close: sqlite3_close=0
    08-10 10:59:15:637 0x7f8392c3eec0 OCC::SyncEngine::handleSyncError: #### ERROR during csync_update : "Invalid characters, please rename "/Users/Diana/user20beta1/The Wanted - Glad You Came (DJ Marley D Club Mix).mp3""
    08-10 10:59:15:638 0x7f8392c3eec0 OCC::SyncEngine::finalize: CSync run took 13
    08-10 10:59:15:642 0x7f8392c3eec0 OCC::Folder::slotSyncFinished: - client version 2.0.0beta1 (build 2613) Qt 5.4.0 SSL OpenSSL 1.0.2d 9 Jul 2015
    08-10 10:59:15:642 0x7f8392c3eec0 OCC::Folder::slotSyncFinished: -> SyncEngine finished with ERROR, warn count is 0
    08-10 10:59:15:643 0x7f8392c3eec0 OCC::Folder::bubbleUpSyncResult: Processing result list and logging took 0 Milliseconds.
    08-10 10:59:15:643 0x7f8392c3eec0 OCC::Folder::bubbleUpSyncResult: OO folder slotSyncFinished: result: 2
    08-10 10:59:15:643 0x7f8392c3eec0 OCC::Folder::slotSyncFinished: ** error Strings: ("Invalid characters, please rename "/Users/Diana/user20beta1/The Wanted - Glad You Came (DJ Marley D Club Mix).mp3"")
    08-10 10:59:15:644 0x7f8392c3eec0 OCC::Folder::slotSyncFinished: * owncloud csync thread finished with error
    08-10 10:59:15:644 0x7f8392c3eec0 OCC::Folder::slotSyncFinished: the last 3 syncs failed
    08-10 10:59:15:644 0x7f8392c3eec0 OCC::SocketApi::sendMessage: SocketApi: Sending message: "STATUS:ERROR:/Users/Diana/user20beta1/"
    08-10 10:59:15:645 0x7f8392c3eec0 OCC::SocketApi::sendMessage: SocketApi: Sending message: "STATUS:ERROR:/Users/Diana/user20beta1/"
    08-10 10:59:15:645 0x7f8392c3eec0 OCC::SocketApi::sendMessage: SocketApi: Sending message: "STATUS:ERROR:/Users/Diana/user20beta1/"
    08-10 10:59:15:646 0x7f8392c3eec0 OCC::SocketApi::sendMessage: SocketApi: Sending message: "STATUS:ERROR:/Users/Diana/user20beta1/"
    08-10 10:59:15:647 0x7f8392c3eec0 OCC::SocketApi::sendMessage: SocketApi: Sending message: "UPDATE_VIEW:/Users/Diana/user20beta1/"
    08-10 10:59:15:647 0x7f8392c3eec0 OCC::SocketApi::sendMessage: SocketApi: Sending message: "UPDATE_VIEW:/Users/Diana/user20beta1/"
    08-10 10:59:15:648 0x7f8392c3eec0 OCC::SocketApi::sendMessage: SocketApi: Sending message: "UPDATE_VIEW:/Users/Diana/user20beta1/"
    08-10 10:59:15:649 0x7f8392c3eec0 OCC::SocketApi::sendMessage: SocketApi: Sending message: "UPDATE_VIEW:/Users/Diana/user20beta1/"
    08-10 10:59:15:649 0x7f8392c3eec0 OCC::ownCloudGui::slotComputeOverallSyncStatus: Folder in overallStatus Message: OCC::Folder(0x7f8392cdf860) with name "ownCloud"
    08-10 10:59:15:650 0x7f8392c3eec0 OCC::ownCloudGui::slotComputeOverallSyncStatus: Folder in overallStatus Message: OCC::Folder(0x7f8392ca5f60) with name "ownCloud1"
    08-10 10:59:15:650 0x7f8392c3eec0 OCC::ownCloudGui::slotSyncStateChange: Sync state changed for folder "ownCloud" : "Error"
    08-10 10:59:15:852 0x7f8392c3eec0 OCC::FolderMan::slotFolderSyncFinished: <===================================== sync finished for "ownCloud"
    08-10 10:59:18:867 0x7f8392de4420 unknown: void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError) QAbstractSocket::RemoteHostClosedError QSslSocket(0x7f8392f15860) QObject(0x0) 0 false 3 0 QAbstractSocket::ConnectedState

  22. Dianafg76 commented on Aug 10, 2015

    @Dianafg76

    And I see this in Option Activity
    screen shot 2015-08-10 at 11 06 13

  23. guruz commented on Aug 10, 2015

    @guruz
    Contributor

    @Dianafg76 Great, thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ReadyToTesttype:bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions