WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
85141
Storing password on GNOME Keyring fails with default encoding != ascii
https://bugs.webkit.org/show_bug.cgi?id=85141
Summary
Storing password on GNOME Keyring fails with default encoding != ascii
Gustavo Noronha (kov)
Reported
2012-04-28 11:27:43 PDT
Storing password on GNOME Keyring fails with default encoding != ascii
Attachments
Patch
(1.66 KB, patch)
2012-04-28 11:29 PDT
,
Gustavo Noronha (kov)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Gustavo Noronha (kov)
Comment 1
2012-04-28 11:29:17 PDT
Created
attachment 139367
[details]
Patch
Gustavo Noronha (kov)
Comment 2
2012-04-28 11:30:09 PDT
This is what happens when the default encoding is utf-8: Store password in system keyring? [y/N]: y Traceback (most recent call last): File "/home/kov/src/WebKit/Tools/Scripts/webkit-patch", line 69, in <module> main() File "/home/kov/src/WebKit/Tools/Scripts/webkit-patch", line 64, in main WebKitPatch(os.path.abspath(__file__)).main() File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 311, in main result = command.check_arguments_and_execute(options, args, self) File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 120, in check_arguments_and_execute return self.execute(options, args, tool) or 0 File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/tool/commands/download.py", line 162, in execute self._process_patch(patch, options, args, tool) File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/tool/commands/download.py", line 181, in _process_patch self._main_sequence.run_and_handle_errors(tool, options, state) File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 70, in run_and_handle_errors self._run(tool, options, state) File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 64, in _run step(tool, options).run(state) File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/tool/steps/applypatchwithlocalcommit.py", line 40, in run ApplyPatch.run(self, state) File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/tool/steps/applypatch.py", line 42, in run self._tool.checkout().apply_patch(state["patch"]) File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/common/checkout/checkout.py", line 161, in apply_patch self._executive.run_command(args, input=patch.contents(), cwd=self._scm.checkout_root) File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/attachment.py", line 94, in contents return self._bug._bugzilla.fetch_attachment_contents(self.id()) File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 442, in fetch_attachment_contents self.authenticate() File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 488, in authenticate username, password = credentials.read_credentials() File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/common/net/credentials.py", line 152, in read_credentials self._offer_to_store_credentials_in_keyring(username, password) File "/home/kov/src/WebKit/Tools/Scripts/webkitpy/common/net/credentials.py", line 134, in _offer_to_store_credentials_in_keyring self._keyring.set_password(self.host, username, password) File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 39, in set_password _keyring_backend.set_password(service_name, username, password) File "/usr/lib/python2.7/dist-packages/keyring/backend.py", line 172, in set_password password, True) TypeError: dict values must be strings, ints or longs, when converting attribute list parameter
Gustavo Noronha (kov)
Comment 3
2012-04-28 11:32:00 PDT
Another thing I was thinking: how do you feel about using epiphany's saved bugzilla password? =)
Martin Robinson
Comment 4
2012-04-28 12:21:19 PDT
Comment on
attachment 139367
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=139367&action=review
> Tools/Scripts/webkitpy/common/net/credentials.py:137 > + self._keyring.set_password(self.host, str(username), str(password))
Won't this be a problem if the username or password contains unicode characters? Perhaps it would be safer to convert to UTF-8 here.
Philippe Normand
Comment 5
2013-02-28 00:19:10 PST
Comment on
attachment 139367
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=139367&action=review
>> Tools/Scripts/webkitpy/common/net/credentials.py:137 >> + self._keyring.set_password(self.host, str(username), str(password)) > > Won't this be a problem if the username or password contains unicode characters? Perhaps it would be safer to convert to UTF-8 here.
I agree with Martin. Also it'd be cool to have a unit-test for this, if possible.
Anders Carlsson
Comment 6
2014-02-05 10:53:15 PST
Comment on
attachment 139367
[details]
Patch Clearing review flag on patches from before 2014. If this patch is still relevant, please reset the r? flag.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug