mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-09-16 12:42:51 +00:00
i2psnark: require POST on all forms
This commit is contained in:
@@ -291,7 +291,9 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
|
||||
String nonce = req.getParameter("nonce");
|
||||
if (nonce != null) {
|
||||
if (nonce.equals(String.valueOf(_nonce)))
|
||||
// the clear messages button is a GET
|
||||
if ((method.equals("POST") || "Clear".equals(req.getParameter("action"))) &&
|
||||
nonce.equals(String.valueOf(_nonce)))
|
||||
processRequest(req);
|
||||
else // nonce is constant, shouldn't happen
|
||||
_manager.addMessage("Please retry form submission (bad nonce)");
|
||||
|
||||
Reference in New Issue
Block a user