瀏覽代碼

SEC-967: TextUtils.java does not escape ampersand character
http://jira.springframework.org/browse/SEC-967. Added escaping of '&' character

Luke Taylor 17 年之前
父節點
當前提交
4e2d6f8b2e
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      core/src/main/java/org/springframework/security/util/TextUtils.java

+ 2 - 0
core/src/main/java/org/springframework/security/util/TextUtils.java

@@ -26,6 +26,8 @@ public abstract class TextUtils {
                 sb.append(""");
             } else if (c == '\'') {
                 sb.append("'");
+            } else if (c == '&') {
+                sb.append("&");
             } else {
                 sb.append(c);
             }