After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 674528 - afp: use the UTF-8 server name for password dialogs
afp: use the UTF-8 server name for password dialogs
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: afp backend
unspecified
Other All
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2012-04-21 15:30 UTC by Cosimo Cecchi
Modified: 2012-04-22 16:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
afp: use the UTF-8 server name for password dialogs (1.57 KB, patch)
2012-04-21 15:30 UTC, Cosimo Cecchi
none Details | Review
afp: convert pascal strings into utf-8 (971 bytes, patch)
2012-04-21 17:27 UTC, Carl-Anton Ingmarsson
committed Details | Review
afp: use the UTF-8 server name for password dialogs when it's available (1.71 KB, patch)
2012-04-21 17:27 UTC, Carl-Anton Ingmarsson
committed Details | Review

Description Cosimo Cecchi 2012-04-21 15:30:17 UTC
This fixes a crash when trying to connect to AFP volumes exported by my PowerBook; see attached patch
Comment 1 Cosimo Cecchi 2012-04-21 15:30:19 UTC
Created attachment 212510 [details] [review]
afp: use the UTF-8 server name for password dialogs

The server name might not be valid UTF-8, which will crash inside
libdbus when serializing. Since we already have an UTF-8 version of the
server name available, just use that.
Comment 2 Carl-Anton Ingmarsson 2012-04-21 17:27:01 UTC
Created attachment 212513 [details] [review]
afp: convert pascal strings into utf-8

pascal strings are in the macintosh-roman character set and therefore need to
be converted into utf-8.
Comment 3 Carl-Anton Ingmarsson 2012-04-21 17:27:04 UTC
Created attachment 212514 [details] [review]
afp: use the UTF-8 server name for password dialogs when it's available
Comment 4 Carl-Anton Ingmarsson 2012-04-21 17:33:27 UTC
Reading the spec I don't think utf8_server_name is guaranteed to exist (it probably always does though). Although we should use it if it exists.

Anyway server_name should be converted from macintosh-roman into utf-8 so that we can use it. Can you test the first patch and see if that one alone fixes the issue?
Comment 5 Cosimo Cecchi 2012-04-21 22:33:04 UTC
(In reply to comment #4)
> Reading the spec I don't think utf8_server_name is guaranteed to exist (it
> probably always does though). Although we should use it if it exists.
> 
> Anyway server_name should be converted from macintosh-roman into utf-8 so that
> we can use it. Can you test the first patch and see if that one alone fixes the
> issue?

Thanks for the quick reply; yes, the first patch fixes the crash for me and I like it better than my approach.
Comment 6 Carl-Anton Ingmarsson 2012-04-22 14:19:31 UTC
Comment on attachment 212514 [details] [review]
afp: use the UTF-8 server name for password dialogs when it's available

Attachment 212514 [details] pushed as a1f285f - afp: use the UTF-8 server name for password dialogs when it's available
Comment 7 Carl-Anton Ingmarsson 2012-04-22 14:20:17 UTC
Comment on attachment 212513 [details] [review]
afp: convert pascal strings into utf-8

Attachment 212513 [details] pushed as dee21fb - afp: convert pascal strings into utf-8
Comment 8 Cosimo Cecchi 2012-04-22 16:59:28 UTC
Thanks, this can be closed as FIXED now.