You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by al...@apache.org on 2026/09/19 23:08:14 UTC

(jspwiki) 01/01: Merge pull request #516 from apache/bug/JSPWIKI-1287

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

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

commit 2f7b934dae1c989a0822612fba3bfd6c5a43a16b
Merge: 2d823d5de d35223c9a
Author: spyhunter99 <sp...@users.noreply.github.com>
AuthorDate: Sat Sep 19 19:08:08 2026 -0400

    Merge pull request #516 from apache/bug/JSPWIKI-1287
    
    JSPWIKI-1287 see jira for details

 .../wiki/http/filter/CsrfProtectionFilterTest.java | 53 ++++++++++++++++++++++
 jspwiki-war/src/main/webapp/Comment.jsp            |  5 ++
 jspwiki-war/src/main/webapp/Delete.jsp             |  6 +++
 jspwiki-war/src/main/webapp/Edit.jsp               |  5 ++
 jspwiki-war/src/main/webapp/Rename.jsp             |  6 +++
 jspwiki-war/src/main/webapp/Workflow.jsp           |  7 +++
 6 files changed, 82 insertions(+)

diff --cc jspwiki-war/src/main/webapp/Workflow.jsp
index 23b472186,805b38738..3e7aeeda8
--- a/jspwiki-war/src/main/webapp/Workflow.jsp
+++ b/jspwiki-war/src/main/webapp/Workflow.jsp
@@@ -54,12 -54,14 +55,18 @@@
      // Get the current decisions
      DecisionQueue dq = wiki.getManager( WorkflowManager.class ).getDecisionQueue();
  
+     String action = request.getParameter( "action" );
+     if( ( "decide".equals( action ) || "abort".equals( action ) ) && !CsrfProtectionFilter.isCsrfProtectedPost( request ) ) {
+         response.sendRedirect( "/error/Forbidden.html" );
+         return;
+     }
+ 
      if( "decide".equals(request.getParameter("action")) )
      {
 +        if( !CsrfProtectionFilter.isCsrfProtectedPost( request ) ) {
 +            response.sendRedirect( "/error/Forbidden.html" );
 +            return;
 +        }
          try
          {
            // Extract parameters for decision ID & decision outcome