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

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

commit b4bfec3842e81bd22a9dae836dd29192a60debd3
Author: David M. Johnson <[email protected]>
AuthorDate: Sat Apr 5 09:40:05 2025 -0400

    Handle multi-part form case for getting salt.
---
 .../apache/roller/weblogger/ui/core/filters/ValidateSaltFilter.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/ValidateSaltFilter.java
 
b/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/ValidateSaltFilter.java
index 9744551bc..586bff185 100644
--- 
a/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/ValidateSaltFilter.java
+++ 
b/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/ValidateSaltFilter.java
@@ -62,7 +62,9 @@ public class ValidateSaltFilter implements Filter {
             if (rollerSession != null) {
                 String userId = rollerSession.getAuthenticatedUser() != null ? 
rollerSession.getAuthenticatedUser().getId() : "";
 
-                String salt = httpReq.getParameter("salt");
+                Object saltObject = httpReq.getAttribute("salt"); // 
multi-form post case
+                String salt = saltObject != null ? saltObject.toString() : 
null;
+                salt = salt != null ? salt : httpReq.getParameter("salt");
                 SaltCache saltCache = SaltCache.getInstance();
                 if (salt == null || !Objects.equals(saltCache.get(salt), 
userId)) {
                     if (log.isDebugEnabled()) {

Reply via email to