gnome-shell/gnome-shell-1036494-Catch-import-errors.patch
Dominique Leuenberger db8a4dd9d2 Accepting request 510027 from home:alarrosa:branches:GNOME:Factory
- Add
  gnome-shell-1036494-Consistently-handle-createExtensionObject-errors.patch,
  gnome-shell-1036494-Catch-import-errors.patch and
  gnome-shell-1036494-Consistently-handle-initExtension-errors.patch
  to handle correctly extensions that fail to load (bsc#1036494,
  bgo#781728, CVE-2017-8288).

OBS-URL: https://build.opensuse.org/request/show/510027
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=309
2017-07-13 08:44:43 +00:00

19 lines
608 B
Diff

Index: gnome-shell-3.20.4/js/ui/extensionSystem.js
===================================================================
--- gnome-shell-3.20.4.orig/js/ui/extensionSystem.js
+++ gnome-shell-3.20.4/js/ui/extensionSystem.js
@@ -224,7 +224,12 @@ function initExtension(uuid) {
let extensionState = null;
ExtensionUtils.installImporter(extension);
- extensionModule = extension.imports.extension;
+ try {
+ extensionModule = extension.imports.extension;
+ } catch(e) {
+ logExtensionError(uuid, e);
+ return false;
+ }
if (extensionModule.init) {
try {