Skip to contentSkip to conversation

classes/base: get_lic_checksum_file_list imporve validaton of url's

PATCH In review Aníbal Limón 2 participants 3 messages May 11, 2016 – May 17, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 classes/base: get_lic_checksum_file_list imporve validaton of url's

When specify an URL different that supported file:// the function returns an empty path causing an exception without notice the user that the URL is Malformed.

[YOCTO #9211]

---
 meta/classes/base.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/base.bbclass +3 -0
index a7ca3a6..c3c2669 100644
@@ -105,6 +105,9 @@ def get_lic_checksum_file_list(d):
         # any others should be covered by SRC_URI.
         try:
             path = bb.fetch.decodeurl(url)[2]
+            if not path:
+                raise bb.fetch.MalformedUrl(url)
+
             if path[0] == '/':
                 if path.startswith(tmpdir):
                     continue
Signature · 1 line
2.1.4
#1 lore raw

ping

Quoted 26 lines · Aníbal Limón

When specify an URL different that supported file:// the function returns an empty path causing an exception without notice the user that the URL is Malformed.

[YOCTO #9211]

---
 meta/classes/base.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/base.bbclass +3 -0
index a7ca3a6..c3c2669 100644
@@ -105,6 +105,9 @@ def get_lic_checksum_file_list(d):
         # any others should be covered by SRC_URI.
         try:
             path = bb.fetch.decodeurl(url)[2]
+            if not path:
+                raise bb.fetch.MalformedUrl(url)
+
             if path[0] == '/':
                 if path.startswith(tmpdir):
                     continue
#2 lore raw

This is in master-next now, thanks Anibal!

Ross

Quoted 38 lines · Aníbal Limón

ping

Quoted 17 lines · Aníbal Limón

When specify an URL different that supported file:// the function returns an empty path causing an exception without notice the user that the URL is Malformed.

[YOCTO #9211]

---
 meta/classes/base.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/base.bbclass +0 -0
index a7ca3a6..c3c2669 100644

meta/classes/base.bbclass def get_lic_checksum_file_list(d): · line 113

Quoted 9 lines
meta/classes/base.bbclass +3 -0
@@ -105,6 +105,9 @@ def get_lic_checksum_file_list(d):
         # any others should be covered by SRC_URI.
         try:
             path = bb.fetch.decodeurl(url)[2]
+            if not path:
+                raise bb.fetch.MalformedUrl(url)
+
             if path[0] == '/':
                 if path.startswith(tmpdir):
                     continue

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core