You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by yasserzamani <gi...@git.apache.org> on 2015/09/10 23:21:05 UTC

[GitHub] struts pull request: WW-4539 Support list of tokens to prevent CSR...

GitHub user yasserzamani opened a pull request:

    https://github.com/apache/struts/pull/49

    WW-4539 Support list of tokens to prevent CSRF attack in async requests

    Nowadays, modern web applications use JQuery, and so, they can send multiple async requests in parallel to the web server. Struts has a great token mechanism which one of it's use cases is preventing from CSRF attack, but it's not usable or hard to use when the user application has multiple valid submission from one jsp using JQuery.
    
    This pull request contains all changes needed to enable Struts to handle this, transparently (i.e. these changes do not break current user application which uses previous token mechanism). Also, this is protected from DOS attack by supplying a maximum for count of concurrent valid requests.
    
    I hope you enjoy it.
    Thanks!

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/yasserzamani/struts master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/struts/pull/49.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #49
    
----
commit 5335d68de6a0ab3543e56f1650d7aaa7e8a40d3f
Author: Yasser Zamani <ya...@live.com>
Date:   2015-09-10T20:59:17Z

    WW-4539 Support list of tokens to prevent CSRF attack in async requests

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


[GitHub] struts pull request: WW-4539 Support list of tokens to prevent CSR...

Posted by yasserzamani <gi...@git.apache.org>.
Github user yasserzamani commented on the pull request:

    https://github.com/apache/struts/pull/49#issuecomment-139486524
  
    @aleksandr-m is genius. Using token tag with different names in same JSP page handles this need perfectly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


[GitHub] struts pull request: WW-4539 Support list of tokens to prevent CSR...

Posted by yasserzamani <gi...@git.apache.org>.
Github user yasserzamani closed the pull request at:

    https://github.com/apache/struts/pull/49


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


[GitHub] struts pull request: WW-4539 Support list of tokens to prevent CSR...

Posted by aleksandr-m <gi...@git.apache.org>.
Github user aleksandr-m commented on the pull request:

    https://github.com/apache/struts/pull/49#issuecomment-139461467
  
    Do we really need a list of tokens? Currently if you use different names for tokens they all will be [stored into session](https://github.com/apache/struts/blob/master/core/src/main/java/org/apache/struts2/util/TokenHelper.java#L91). Does using token tag with a name solve you problem?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org