snoopdave opened a new pull request, #207:
URL: https://github.com/apache/roller/pull/207

   ## Summary
   
   Each Roller page carries one form salt, shared by all of its forms, and a 
salt can be used only once. The blogroll, category and ping target pages save a 
dialog with AJAX and then post the page form again. The second post sent the 
salt the AJAX request had already used, so it was refused and the user got an 
error page. A retry after a "name already in use" message failed the same way.
   
   - **New `refreshSalt(html)` in `theme/scripts/roller.js`.** It reads the 
salt issued with an AJAX response (parsed with `DOMParser`, so no scripts run) 
and copies it into every `salt` field on the page.
   - **Called first in each AJAX `done` handler:**
     - `Bookmarks.jsp`: rename blogroll, add or edit blogroll, save bookmark
     - `Categories.jsp`: save category
     - `PingTargets.jsp`: save ping target
   - **"Switch to blogroll" no longer submits on `mouseup`.** Chrome fires 
`mouseup` when the list opens, so the page reloaded before a blogroll could be 
picked. `onchange` is kept.
   
   No Java changes.
   
   ## Testing
   
   - Found during manual 6.1.7 testing: adding a blogroll returned 500 from 
`POST bookmarks!view.rol` ("Security Violation" from `SaltValidator`), and the 
blogroll selector reloaded on every click.
   - Manual retest on the 6.1.7 integration build: pending.
   
   Targets `roller-6.1.x` for 6.1.7. It will be cherry-picked to `master` after 
the 6.1.7 release.


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