efegokdemir commented on code in PR #308:
URL: 
https://github.com/apache/maven-remote-resources-plugin/pull/308#discussion_r4234762393


##########
src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java:
##########
@@ -992,6 +995,24 @@ protected void processResourceBundles(ClassLoader 
classLoader, VelocityContext c
         }
     }
 
+    static File resolveOutputFile(File outputDirectory, String resourceName)
+            throws IOException, MojoExecutionException {
+        return resolveOutputFile(outputDirectory, 
outputDirectory.getCanonicalFile(), resourceName);
+    }
+
+    private static File resolveOutputFile(File outputDirectory, File 
canonicalOutputDirectory, String resourceName)
+            throws IOException, MojoExecutionException {
+        if (new File(resourceName).isAbsolute()) {
+            throw new 
MojoExecutionException(INVALID_REMOTE_RESOURCE_PATH_MESSAGE + resourceName);

Review Comment:
   Fixed in `0a6e328f3d7cef8cfecb9c91c742ba21e63f06bf`: absolute paths and 
paths escaping the output directory now use distinct error messages, with tests 
asserting each case. `git diff --check` passed. I could not run Maven locally 
because Java is unavailable; the previous Windows/JDK 25 job failed before 
tests after Maven Central returned HTTP 429. CI for this commit has not 
reported yet.



-- 
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