WebKit Bugzilla
Attachment 343731 Details for
Bug 187107
: webkit-patch should ignore non-ASCII characters in the status server API key
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-187107-20180627112743.patch (text/plain), 2.53 KB, created by
Daniel Bates
on 2018-06-27 11:27:43 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2018-06-27 11:27:43 PDT
Size:
2.53 KB
patch
obsolete
>Subversion Revision: 233262 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 6a1e287cba03dee0d5cfe91d1a04b9526220da6c..a2e36865e16e29b43032c35b95e7dbcea2e0bc41 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,19 @@ >+2018-06-27 Daniel Bates <dabates@apple.com> >+ >+ webkit-patch should ignore non-ASCII characters in the status server API key >+ https://bugs.webkit.org/show_bug.cgi?id=187107 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The API key should only consists of ASCII characters. If it contains any >+ non-ASCII characters then log a warning and ignore them. >+ >+ * Scripts/webkitpy/common/net/statusserver.py: >+ (StatusServer.set_api_key): Force conversion to ASCII. >+ * Scripts/webkitpy/tool/main.py: >+ (WebKitPatch._status_server_api_key): Convert to ASCII, ignoring non-ASCII >+ characters and logging a warning. >+ > 2018-06-27 Robin Morisset <rmorisset@apple.com> > > [WSL] Add a control-flow stack to the execution rules in WSL.ott >diff --git a/Tools/Scripts/webkitpy/common/net/statusserver.py b/Tools/Scripts/webkitpy/common/net/statusserver.py >index 9aa827461f987f3879fd0553ec886cf9166723d5..3f5beb10bcc9871ce64c37874e33c18956d7d9d0 100644 >--- a/Tools/Scripts/webkitpy/common/net/statusserver.py >+++ b/Tools/Scripts/webkitpy/common/net/statusserver.py >@@ -63,7 +63,7 @@ class StatusServer: > self.bot_id = bot_id > > def set_api_key(self, api_key): >- self._api_key = api_key >+ self._api_key = str(api_key) > new_headers = filter(lambda header: header[0] != self._AUTHORIZATION_HEADER_NAME, self._browser.addheaders) > if api_key: > new_headers.append(self._authorization_header_name_and_value_pair()) >diff --git a/Tools/Scripts/webkitpy/tool/main.py b/Tools/Scripts/webkitpy/tool/main.py >index e77b83ac58d1b819126e247aa5612ed17cf5f24e..783a3fdc0774f03552afe52d18150205e8ace707 100644 >--- a/Tools/Scripts/webkitpy/tool/main.py >+++ b/Tools/Scripts/webkitpy/tool/main.py >@@ -111,6 +111,11 @@ class WebKitPatch(MultiCommandTool, Host): > api_key = os.environ.get('WEBKIT_STATUS_API_KEY') > if not api_key: > api_key = WebKitPatch._status_server_api_key_from_git() >+ try: >+ api_key = str(api_key) >+ except UnicodeEncodeError: >+ _log.warning('Ignoring non-ASCII characters in API key.') >+ api_key = api_key.encode('ascii', 'ignore') > return api_key > > # FIXME: This may be unnecessary since we pass global options to all commands during execute() as well.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 187107
: 343731