WebKit Bugzilla
Attachment 369551 Details for
Bug 197771
: [Flatpak] Use the safe PyYAML loader if available
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197771-20190510164220.patch (text/plain), 1.46 KB, created by
Adrian Perez
on 2019-05-10 06:42:21 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Adrian Perez
Created:
2019-05-10 06:42:21 PDT
Size:
1.46 KB
patch
obsolete
>Subversion Revision: 245171 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 6967cbafac8cc75630461a38105661f2ec617f79..0af1226a8fdb532e267e3f03b01938143344ac0d 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,14 @@ >+2019-05-10 Adrian Perez de Castro <aperez@igalia.com> >+ >+ [Flatpak] Use the safe PyYAML loader if available >+ https://bugs.webkit.org/show_bug.cgi?id=197771 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * flatpak/flatpakutils.py: >+ (load_manifest): Use yaml.safe_load() if available, with yaml.load() >+ still used as fallback when the former is not provided by the module. >+ > 2019-05-09 Fujii Hironori <Hironori.Fujii@sony.com> > > WinCairo WebKitTestRunner should take platform/wk2/TestExpectations into account >diff --git a/Tools/flatpak/flatpakutils.py b/Tools/flatpak/flatpakutils.py >index 992495859cc80fe97ed5ef26bd54bac6b875113c..d52131803544b9de3c9e804f3fd88a3ae1f21a6f 100644 >--- a/Tools/flatpak/flatpakutils.py >+++ b/Tools/flatpak/flatpakutils.py >@@ -155,8 +155,8 @@ def load_manifest(manifest_path, port_name=None, command=None): > contents = contents % {"COMMAND": command, "PORTNAME": port_name} > if is_yaml: > import yaml >- >- manifest = yaml.load(contents) >+ yaml_load = getattr(yaml, "safe_load", yaml.load) >+ manifest = yaml_load(contents) > else: > contents = remove_comments(contents) > manifest = json.loads(contents)
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 197771
: 369551