You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2021/02/08 06:27:18 UTC

[struts] branch master updated: WW-5116 Fix wrong regex range

This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/master by this push:
     new 53c0f50  WW-5116 Fix wrong regex range
     new eb8bc5e  Merge pull request #471 from Marcono1234/patch-1
53c0f50 is described below

commit 53c0f50ead31923778bb076fa4c9191daa5ef1de
Author: Marcono1234 <Ma...@users.noreply.github.com>
AuthorDate: Fri Feb 5 22:50:53 2021 +0100

    WW-5116 Fix wrong regex range
---
 core/src/main/java/org/apache/struts2/result/PostbackResult.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/struts2/result/PostbackResult.java b/core/src/main/java/org/apache/struts2/result/PostbackResult.java
index 1fc8c6e..96015e8 100644
--- a/core/src/main/java/org/apache/struts2/result/PostbackResult.java
+++ b/core/src/main/java/org/apache/struts2/result/PostbackResult.java
@@ -152,7 +152,7 @@ public class PostbackResult extends StrutsResultSupport {
         } else {
             String location = getLocation();
             // Do not prepend if the URL is a FQN
-            if (!location.matches("^([a-zA-z]+:)?//.*")) {
+            if (!location.matches("^([a-zA-Z]+:)?//.*")) {
                 // If the URL is relative to the servlet context, prepend the servlet context path
                 if (prependServletContext && (request.getContextPath() != null) && (request.getContextPath().length() > 0)) {
                     location = request.getContextPath() + location;