[librsvg: 1/2] css: Only allow css imports from the same base directory




commit 4c4ef228c98970e9a8d81e3b7dd1bfa4830fe3ba
Author: Lars Schmertmann <SmallLars t-online de>
Date:   Thu Apr 23 17:35:53 2020 +0200

    css: Only allow css imports from the same base directory
    
    When A imports C, C was allowed to import B:
    A.css
    B.css
    example/C.css

 rsvg_internals/src/css.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/css.rs b/rsvg_internals/src/css.rs
index f1c91e35..0bb698ad 100644
--- a/rsvg_internals/src/css.rs
+++ b/rsvg_internals/src/css.rs
@@ -713,7 +713,7 @@ impl Stylesheet {
                     LoadingError::BadCss
                 })
             })
-            .and_then(|utf8| self.parse(&utf8, base_url))
+            .and_then(|utf8| self.parse(&utf8, Some(&aurl)))
     }
 
     /// Appends the style declarations that match a specified node to a given vector


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]