gnodet-bot commented on code in PR #2354:
URL: https://github.com/apache/maven-resolver/pull/2354#discussion_r4725977179


##########
maven-resolver-util/src/main/java/org/eclipse/aether/util/ConfigUtils.java:
##########
@@ -324,20 +332,29 @@ public static List<?> getList(RepositorySystemSession 
session, List<?> defaultVa
 
             if (value instanceof Map) {
                 return (Map<?, ?>) value;
+            } else if (value instanceof String) {
+                Properties parsed = new Properties();
+                try {
+                    parsed.load(new StringReader((String) value));
+                } catch (IOException e) {
+                    throw new UncheckedIOException("Failed to parse map 
configuration value for " + key, e);
+                }

Review Comment:
   🐛 **[HIGH] Missing `IllegalArgumentException` from `Properties.load()`**
   
   `Properties.load(Reader)` throws `IllegalArgumentException` on malformed 
Unicode escapes (`\uZZZZ`). Only `IOException` is caught here, so a 
misconfigured header value would propagate as an unexpected unchecked 
exception. The companion backport PR #2355 catches both.
   
   ```suggestion
                   } catch (IOException | IllegalArgumentException e) {
                       throw new IllegalArgumentException("Failed to parse map 
configuration value for " + key, e);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to