Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the logging logic with SLF4J #30 #32

Closed
wants to merge 280 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
280 commits
Select commit Hold shift + click to select a range
ccad966
code cleanup
SPoint42 Dec 17, 2015
d93746b
Merge pull request #47 from SPoint42/master
aramrami Dec 17, 2015
3c05a9f
Merge pull request #38 from 40rn05lyv/onload-defect
aramrami Dec 17, 2015
1233992
Merge pull request #37 from 40rn05lyv/action-defect
aramrami Dec 17, 2015
b608078
Merge pull request #36 from 40rn05lyv/unload-defect-(small-change)
aramrami Dec 17, 2015
aa6ca64
Merge pull request #35 from 40rn05lyv/eclipse-config
aramrami Dec 17, 2015
9692058
Merge pull request #22 from hsn10/domain-origin
aramrami Dec 17, 2015
dcc5815
Merge pull request #23 from hsn10/wrong-cfg-classname
aramrami Dec 17, 2015
a494d4d
Merge pull request #33 from 40rn05lyv/oldjs-defect
aramrami Dec 17, 2015
cc6ca56
Fix element misses happening due to form injection
ayomawdb Jul 18, 2016
619f45e
Resolve issue where redirect with a fragment is invalid after appendi…
Sep 12, 2016
8aa395b
Small bugfixes in properties and tags
CesarPantoja Oct 18, 2016
918ac7a
tokenname and tokenvalue tags fixed
venosov Nov 27, 2016
7096e69
Fix: only display analyzing object if it is a protected object to be …
cxzero Apr 20, 2017
b269319
Added in finally block for fromFileStream and toFileStream
Jun 15, 2017
e34e1d5
Added finally block and comment to copy()
itsallvoodoo Jun 15, 2017
92cff5e
Fixed improperly formatted max-age Cache-Control config
Jun 16, 2017
126fb99
Remove underscore from token name
yuri1969 Jun 21, 2017
4aae769
Merge pull request #72 from itsallvoodoo/cachecontrol
aramrami Jul 3, 2017
f2ed08e
Merge pull request #74 from yuri1969/master
aramrami Jul 3, 2017
b911905
Merge pull request #69 from cxzzero/master
aramrami Jul 3, 2017
41533dd
Merge pull request #71 from itsallvoodoo/itsallvoodoo-streams
aramrami Jul 3, 2017
bfd8157
Merge pull request #65 from venosov/master
aramrami Jul 3, 2017
4f43d69
Merge pull request #60 from eduong/master
aramrami Jul 3, 2017
9e26fc1
Merge pull request #59 from ayomawdb/master
aramrami Jul 3, 2017
a7c199a
75 : If ajax is disabled, the javascript token injection don't work
mmedjahed Jul 27, 2017
7eeb684
Updates to JavaScript servlet to allow for unprotected file extensions
skotfred Sep 6, 2017
aea39db
Added the missing &&
skotfred Sep 6, 2017
76c1f8c
Added commented out example values for
skotfred Sep 6, 2017
8e615c5
comparing x-requested-with header with value injected in js
Nov 7, 2017
9bbea33
Merge pull request #1 from ilsurih/bugfix/fix_android_misunderstanding
ilsurih Nov 7, 2017
4cf285a
Fixes #83 Null pointer when using NullConfigurationProvider
Nov 10, 2017
6caae46
remove tailing whitespace for boolean value, which leads to parsing t…
Dec 23, 2017
39d1338
Avoid impact of JDK GZIP compression issue (JDK-8189789) on CSRFGuard
ayomawdb Jan 11, 2018
3beb97f
Page tokens generation on session creation
brunowdev Apr 15, 2018
c96d605
Don't overwrite String.startsWith and String.endsWith
May 18, 2018
2e85b4e
Avoid using a regex for endsWith
May 22, 2018
cbdc74e
Add "classpath:" prefix support for reading javascript template
May 18, 2018
2b837d1
Synchronize test javascript file
May 22, 2018
5815eb8
Issue #64 · Proposed Solution
esacco2 May 2, 2019
69c8437
Issue #64 · Proposed Solution
esacco2 May 2, 2019
20f3708
Merge pull request #103 from Restlessjoker/master
aramrami May 13, 2019
2170a6a
Merge pull request #99 from Crydust/javascriptTemplateFromClasspath
aramrami May 13, 2019
9c32ddc
Merge pull request #98 from Crydust/startsWithAndEndswith
aramrami May 13, 2019
ecd7b08
Merge pull request #97 from brunowdev/master
aramrami May 13, 2019
34369a2
Merge pull request #93 from ayomawdb/master
aramrami May 13, 2019
c2b3cf5
Merge branch 'master' into master
aramrami May 13, 2019
985f3a9
Merge pull request #63 from CesarPantoja/master
aramrami May 13, 2019
623f1ac
Merge pull request #76 from mmedjahed/master
aramrami May 13, 2019
d197506
Merge pull request #82 from skotfred/master
aramrami May 13, 2019
9fce593
Merge pull request #87 from ilsurih/master
aramrami May 13, 2019
9e3f603
Merge pull request #88 from seryckd-jda/bugfix/fix#83-nullconfigurati…
aramrami May 13, 2019
9a3a27a
Merge pull request #91 from zyjibmcn/master
aramrami May 13, 2019
503e399
Update readme.md
aramrami May 13, 2019
a770b93
Update readme.md
aramrami May 13, 2019
8270801
Update readme.md
aramrami May 13, 2019
150315e
Update readme.md
aramrami May 13, 2019
217507e
Issue #100: Replaced the way to parse hostname from the URL to be abl…
glitchcube Aug 23, 2019
9a8360e
Merge pull request #109 from glitchcube/master
aramrami Aug 23, 2019
699902a
Page token not verified if Protect flag is False
tsenovIvan Aug 23, 2019
9e20551
Merge pull request #110 from tsenovIvan/master
aramrami Aug 23, 2019
c824eba
Issue #92: Adding check in the JavaScript to avoid loading multiple t…
glitchcube Sep 22, 2019
dbe96ac
Update readme.md
aramrami Nov 4, 2019
5e3fb44
Create leaders.md
aramrami Nov 4, 2019
d32dfc3
Create info.md
aramrami Nov 4, 2019
1919bcf
Update info.md
aramrami Nov 4, 2019
63af997
Create ff
aramrami Nov 4, 2019
64fe2d4
Add files via upload
aramrami Nov 4, 2019
4cb6e41
Delete ff
aramrami Nov 4, 2019
c4b296d
Update info.md
aramrami Nov 4, 2019
c5d7aa9
Create tab_features.md
aramrami Nov 4, 2019
95c6deb
Create tab_news.md
aramrami Nov 4, 2019
61354ee
Create tab_screenshots.md
aramrami Nov 4, 2019
a727f1c
Create tab_supporters.md
aramrami Nov 4, 2019
076c286
Update readme.md
aramrami Nov 4, 2019
c0b2d64
Update tab_news.md
aramrami Nov 4, 2019
1468e02
Update tab_supporters.md
aramrami Nov 4, 2019
14b29a5
Update tab_news.md
aramrami Nov 4, 2019
6553d5f
Update tab_news.md
aramrami Nov 4, 2019
d8587f1
Update info.md
aramrami Nov 4, 2019
18d4562
Add files via upload
aramrami Nov 4, 2019
8418d0e
Delete csrfguard_in_action.PNG
aramrami Nov 4, 2019
e06d751
Add files via upload
aramrami Nov 4, 2019
9118442
Update tab_screenshots.md
aramrami Nov 4, 2019
62b49b1
Update tab_screenshots.md
aramrami Nov 4, 2019
9baca06
Update tab_features.md
aramrami Nov 4, 2019
4765ceb
Add files via upload
aramrami Nov 4, 2019
dfd555e
Update tab_features.md
aramrami Nov 4, 2019
581411c
Add files via upload
aramrami Nov 4, 2019
b7c5f3b
Update tab_features.md
aramrami Nov 4, 2019
834c39c
Update tab_supporters.md
aramrami Nov 4, 2019
5d3ee61
Create index.md
aramrami Nov 4, 2019
181a9ba
Update leaders.md
aramrami Nov 4, 2019
e2b74f7
Update tab_features.md
aramrami Nov 4, 2019
7d39298
Update tab_news.md
aramrami Nov 4, 2019
aacd870
Update tab_screenshots.md
aramrami Nov 4, 2019
0e65053
Update tab_screenshots.md
aramrami Nov 4, 2019
a25fbb9
Update tab_screenshots.md
aramrami Nov 4, 2019
9e6e2ec
Update tab_features.md
aramrami Nov 4, 2019
ae10675
Update tab_screenshots.md
aramrami Nov 4, 2019
418c4ae
Update tab_supporters.md
aramrami Nov 4, 2019
b2909a8
Create i
aramrami Nov 4, 2019
217342a
Create s
aramrami Nov 4, 2019
64633e8
Add files via upload
aramrami Nov 4, 2019
9db0cd4
Delete credentials_included.png
aramrami Nov 4, 2019
e611410
Delete csrfguard_in_action.png
aramrami Nov 4, 2019
1cfbc13
Delete mature_projects.png
aramrami Nov 4, 2019
8a561f4
Delete owasp_breakers_small.png
aramrami Nov 4, 2019
cf1e6e8
Delete owasp_builders_small.png
aramrami Nov 4, 2019
a7854a8
Delete owasp_tool_project.png
aramrami Nov 4, 2019
9859c49
Delete what_is_csrf_attacks_1.png
aramrami Nov 4, 2019
d8c3c69
Delete what_is_csrf_attacks_2.png
aramrami Nov 4, 2019
8805559
Delete what_is_csrf_attacks_3.png
aramrami Nov 4, 2019
8524cbc
Delete what_is_csrf_attacks_4.png
aramrami Nov 4, 2019
2abdbfc
Delete what_is_csrf_attacks_5.png
aramrami Nov 4, 2019
4b022d2
Delete what_is_csrf_attacks_6.png
aramrami Nov 4, 2019
01dbade
Delete what_is_csrf_attacks_7.png
aramrami Nov 4, 2019
78cf88f
Delete i
aramrami Nov 4, 2019
4142653
Delete s
aramrami Nov 4, 2019
b53f7ad
Add files via upload
aramrami Nov 4, 2019
0a033d3
Update tab_features.md
aramrami Nov 4, 2019
8e70d36
Update tab_screenshots.md
aramrami Nov 4, 2019
b5071f9
Update tab_features.md
aramrami Nov 4, 2019
982561f
Add files via upload
aramrami Nov 4, 2019
14dc845
Code cleanup/refactor - Sonar
ssrijan Nov 8, 2019
97d7f37
Merge pull request #116 from ssrijan/feature/sonar-fixes
aramrami Nov 8, 2019
18ea611
Fix for when a URL has a colon but doesn't start with a protocol, suc…
primate-zero Dec 5, 2019
dc44d21
Update index.md
aramrami Jan 2, 2020
f0e100e
Update readme.md
aramrami Apr 23, 2020
80732cb
Create pom.xml
aramrami Apr 23, 2020
b14dfd9
Create welcome.xhtml
aramrami Apr 23, 2020
d84253d
Create hello.xhtml
aramrami Apr 23, 2020
ce40dd9
Create web.xml
aramrami Apr 23, 2020
cb9ee22
Create glassfish-web.xml
aramrami Apr 23, 2020
3b4bd38
Create csrfguard.properties
aramrami Apr 23, 2020
77eac4b
Create HelloBean.java
aramrami Apr 23, 2020
c1a964f
Merge pull request #118 from primate-zero/master
aramrami May 4, 2020
db16d99
Merge pull request #114 from glitchcube/master
aramrami May 4, 2020
bb3421e
Created proper multi-module maven structure:
forgedhallpass Jul 30, 2020
6dbddd9
[#130] Updated target release date for version 4.0
forgedhallpass Jul 30, 2020
84048be
Added and updated the copyright in all files to be unified across the…
forgedhallpass Aug 3, 2020
193f91a
[#134] Improve code quality
forgedhallpass Aug 4, 2020
205cbb9
[#128, #129] Instruction for building the project and deploying the t…
forgedhallpass Aug 5, 2020
9825240
The test JSP web application should rely on the latest development Ja…
forgedhallpass Aug 5, 2020
1b9b89a
Removed unused and unnecessary code from the classes copied from the …
forgedhallpass Aug 24, 2020
5abb3c7
Minor refactoring and TODOs #134
forgedhallpass Aug 24, 2020
3f3ef2c
Maven source code and javadoc generation + updated Maven plugin versi…
forgedhallpass Aug 24, 2020
9a9bed3
[#122] Provide support for stateless web applications (part 1)
forgedhallpass Aug 24, 2020
8becb7e
[#122] WIP: Provide support for stateless web applications (part 2)
forgedhallpass Aug 26, 2020
27c2487
[#128] Proper multi-module maven project structure
forgedhallpass Aug 28, 2020
5c24e4e
[#122] WIP: Provide support for stateless web applications (part 3)
forgedhallpass Aug 28, 2020
42cc0e2
[#122] WIP: Provide support for stateless web applications (part 4)
forgedhallpass Aug 28, 2020
64a2b51
[#141] The solution differentiates resource URIs if they have a leadi…
forgedhallpass Aug 28, 2020
de6a7b5
Javadocs and minor modifications
forgedhallpass Sep 4, 2020
61a94c5
[#142] The csrfguard.js template should be parsable and minifiable
forgedhallpass Sep 4, 2020
5a6e85d
[#143] The javascript logic should not be applied if CSRFGuard is dis…
forgedhallpass Sep 10, 2020
84fb53d
[#144] Do not generate page tokens for pages that are not protected
forgedhallpass Sep 10, 2020
bea3ae4
[#141] Provide a better solution for looking up page tokens in the JS…
forgedhallpass Sep 10, 2020
c787303
[#145] Page tokens generated on first use are not sent back to the cl…
forgedhallpass Sep 15, 2020
2d29a3c
[#147] Possible race condition on first access of endpoints when toke…
forgedhallpass Sep 16, 2020
7ab8885
[#147] Possible race condition on first access of endpoints when toke…
forgedhallpass Sep 18, 2020
c8541e4
[#148] Tokens are not injected into dynamically created DOM elements
forgedhallpass Sep 18, 2020
8ce93d0
[#147] Possible race condition on first access of endpoints when toke…
forgedhallpass Sep 22, 2020
bab511d
[#143] Short-circuit the solution logic is CSRFGuard is disabled
forgedhallpass Sep 22, 2020
0488c29
[#134] Automatically all parameters when printing the configuration p…
forgedhallpass Sep 22, 2020
d590ae9
[#148] Tokens are not injected into dynamically created DOM elements …
forgedhallpass Oct 1, 2020
18ab5cc
[#149] Make the configuration more resilient to errors
forgedhallpass Oct 5, 2020
51aaf91
[#149] Make the configuration more resilient to errors
forgedhallpass Oct 6, 2020
bb65071
1. The logic in the ajax.html test page from the JSP test webapp inco…
forgedhallpass Oct 6, 2020
3e19915
[#146] Issue with the token-per-page support for REST endpoint contai…
forgedhallpass Oct 6, 2020
9c9f855
[#150] Tokens should not be injected into external links if the domai…
forgedhallpass Oct 8, 2020
1c3bb46
[#146] Issue with the token-per-page support for REST endpoint contai…
forgedhallpass Nov 20, 2020
1fa65e3
Fixed the JSP tag library separation and added support for extended p…
forgedhallpass Dec 9, 2020
0331c21
Merge pull request #136 from forgedhallpass/development
aramrami Jan 21, 2021
65a4801
Fixed the JSP tag library separation and added support for extended p…
forgedhallpass Feb 13, 2021
8f7ff6c
Added option to force legacy synchronous AJAX behaviour for legacy ap…
forgedhallpass Feb 13, 2021
23e586a
Added new scenarios to the demo application to enable testing more co…
forgedhallpass Feb 13, 2021
64eb607
Update tab_roadmap.md
aramrami Feb 16, 2021
ebe392d
Update tab_roadmap.md
aramrami Feb 16, 2021
a7516ab
Merge remote-tracking branch 'aramrami/master'
forgedhallpass Feb 17, 2021
0856433
Version update to 4.0
forgedhallpass Feb 17, 2021
23bee2a
Merge remote-tracking branch 'forgedhallpass/development'
forgedhallpass Feb 17, 2021
75d8dc9
Proper format for automation
hblankenship Feb 4, 2021
9bbc14d
Removing left-over files after auto-merge
forgedhallpass Feb 17, 2021
c5b8970
* Fix HTML page demonstrating protection of GET resources (IMG and IF…
forgedhallpass Feb 18, 2021
bebf804
Update index.md
aramrami Feb 19, 2021
51c3ed1
Update info.md
aramrami Feb 19, 2021
0955e7b
Update index.md
aramrami Feb 19, 2021
9ea1703
Removing left-over files after auto-merge (2)
forgedhallpass Feb 19, 2021
bd02fd6
Removed the test-jsf application because:
forgedhallpass Feb 19, 2021
75559a9
Added 4.0 release notes
forgedhallpass Feb 19, 2021
4bd7679
Update issue templates
forgedhallpass Feb 19, 2021
259eea3
Rename Gemfile to Gemfile.old
aramrami Feb 19, 2021
afa887b
Rename _config.yml to _config.yml.old
aramrami Feb 19, 2021
221448a
Rename readme.md to readme.md.old
aramrami Feb 19, 2021
b0680af
Update info.md
aramrami Feb 19, 2021
937c288
Rename pom.xml to pom.xml.old
aramrami Feb 19, 2021
da5f154
Delete tab_example.md
aramrami Feb 19, 2021
2379f2e
Rename Gemfile.old to Gemfile
aramrami Feb 19, 2021
746fbe7
Rename _config.yml.old to _config.yml
aramrami Feb 19, 2021
e3563a0
Rename pom.xml.old to pom.xml
aramrami Feb 19, 2021
d16d7d8
Rename readme.md.old to readme.md
aramrami Feb 19, 2021
b2bba11
must put code in code blocks
hblankenship Feb 22, 2021
12de005
[#8] Ability to extend CsrfGuardFilter (removed final modifier from C…
forgedhallpass Mar 3, 2021
2fff8f0
remote update file
OWASPFoundation Mar 9, 2021
07e4564
Set charset in content-type for text/javascript #10
jellisgwn Apr 8, 2021
fa60e72
Create maven configuration to automate deployment to OSSRH
forgedhallpass Apr 8, 2021
a037711
[maven-release-plugin] prepare release csrfguard-parent-4.0.0
forgedhallpass Apr 8, 2021
b6d8cd9
[maven-release-plugin] prepare for next development iteration
forgedhallpass Apr 8, 2021
52f8f2e
#12 - Create maven configuration to automate deployment to OSSRH
forgedhallpass Apr 8, 2021
6d0c055
[maven-release-plugin] prepare release release/4.0.0
forgedhallpass Apr 8, 2021
c0cdb38
[maven-release-plugin] prepare for next development iteration
forgedhallpass Apr 8, 2021
8494f4a
Update readme.md
forgedhallpass Apr 14, 2021
ebb1ca5
Update info.md
aramrami Apr 20, 2021
e30e945
Added pitch, for description in owasp.org/projects
martinmarsicano Apr 22, 2021
653518a
add OWASP to title
hblankenship Apr 29, 2021
f31b2d3
Update readme.md
forgedhallpass Jun 25, 2021
7ea446b
Added LICENSE file
forgedhallpass Jun 25, 2021
787fd76
Update readme.md
forgedhallpass Jul 1, 2021
7299188
remote update file
OWASPFoundation Jul 7, 2021
7b2fc28
Check that CSRFGuard is enabled before injecting tokens with JSP Tags…
alexhatz05 Aug 12, 2021
8253589
Update TokenNameTag.java
alexhatz05 Aug 12, 2021
ec882e9
Update TokenNameTag.java
alexhatz05 Aug 12, 2021
13d8eda
Update TokenTag.java
alexhatz05 Aug 12, 2021
35a0b5e
Update TokenValueTag.java
alexhatz05 Aug 12, 2021
f0b6ea1
Implement reviwer's comments (round2) for TokenTag and TokenValueTag.
alexhatz05 Aug 12, 2021
e5bf53c
Merge pull request #20 from alexhatz05/check_if_enabled_before_inject…
forgedhallpass Aug 12, 2021
60335c9
Re-order modifiers to be compliant with JAVA convention.
alexhatz05 Aug 13, 2021
d5f322e
Use diamond operator to reduce verbosity.
alexhatz05 Aug 13, 2021
617abef
Re-order modifiers to comply with Java convention.
alexhatz05 Aug 13, 2021
573568a
Revert "Use diamond operator to reduce verbosity."
alexhatz05 Aug 13, 2021
aab4182
Merge pull request #22 from alexhatz05/resolve-code-smells
forgedhallpass Aug 13, 2021
127bf3c
[maven-release-plugin] prepare release 4.0.1
forgedhallpass Aug 20, 2021
26d5184
[maven-release-plugin] prepare for next development iteration
forgedhallpass Aug 20, 2021
771ed4b
#15 Documentation: csrfguard.properties improvement
forgedhallpass Aug 20, 2021
42dbf43
Added extra information on how to set up the environment and perform …
forgedhallpass Aug 20, 2021
99db849
Modified the test application to enable testing for CSRF against a se…
forgedhallpass Sep 9, 2021
438074d
Apply log message sanitization where missing, to prevent forging logs…
forgedhallpass Sep 10, 2021
fade4cf
Added option to create an executable JAR file for the Test JSP applic…
forgedhallpass Sep 14, 2021
11d57c7
Added filter in the test package to enable CORS for testing purposes.
forgedhallpass Sep 14, 2021
8b6ba83
Minor bugfix in the JavaScriptServlet, when trying to send error afte…
forgedhallpass Sep 14, 2021
894892c
Preventing to serve the CSRF JavaScript logic if the referer pattern …
forgedhallpass Sep 14, 2021
c26e78e
Updated the mailing list address.
forgedhallpass Sep 15, 2021
8195b83
Minor change to adapt a message to the previous log sanitization logic.
forgedhallpass Sep 21, 2021
717712d
Minor typo fixes
forgedhallpass Sep 21, 2021
15d4df8
Fixed the test CounterServlet endpoint to "mimic" authentication by:
forgedhallpass Sep 21, 2021
2716e14
Added some code to simulate CSRF attacks against the /counter endpoint.
forgedhallpass Sep 21, 2021
a92d4dc
Update index.md
aramrami Oct 2, 2021
b77f245
Update index.md
aramrami Oct 2, 2021
0bb4ffd
Minor documentation fixes.
forgedhallpass Oct 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
52 changes: 49 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
__pycache__
env
.vscode
## Directory-based project format:
.idea/
!.idea/copyright
!.idea/dataSources.xml

## File-based project format:
*.ipr
*.iws
*.iml

# Output directories
target/
/build/
/dist/
bin/
*.class

# Eclipse metadata
.metadata
.project
.recommenders
.settings
.classpath
.loadpath

# NetBeans specific
nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml

# SonarGraph metadata
*.sonargraph

# Overlays
*overlays/

# MacOS files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
_site/
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
group :jekyll_plugins do
gem "github-pages"
end
end
29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2011, Eric Sheridan
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
remote_theme: "owasp/www--site-theme"
remote_theme: "owasp/www--site-theme@main"
plugins:
- jekyll-include-cache-0.2.0
- jekyll-include-cache-0.2.0
53 changes: 53 additions & 0 deletions csrfguard-extensions/csrfguard-extension-session/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ The OWASP CSRFGuard Project, BSD License
~ Copyright (c) 2011, Eric Sheridan ([email protected])
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ 1. Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ 2. Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ 3. Neither the name of OWASP nor the names of its contributors may be used
~ to endorse or promote products derived from this software without specific
~ prior written permission.
~
~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
~ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
~ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
~ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
~ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
~ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
~ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
~ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
~ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.owasp</groupId>
<artifactId>csrfguard-extensions</artifactId>
<version>4.0.2-SNAPSHOT</version>
</parent>

<artifactId>csrfguard-extension-session</artifactId>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>csrfguard</artifactId>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* The OWASP CSRFGuard Project, BSD License
* Copyright (c) 2011, Eric Sheridan ([email protected])
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of OWASP nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package org.owasp.csrfguard;

import org.owasp.csrfguard.session.ContainerSession;
import org.owasp.csrfguard.session.LogicalSession;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

public class CsrfGuardHttpSessionListener implements HttpSessionListener {

@Override
public void sessionCreated(final HttpSessionEvent event) {
final HttpSession session = event.getSession();
final LogicalSession logicalSession = new ContainerSession(session);
CsrfGuard.getInstance().onSessionCreated(logicalSession);
}

@Override
public void sessionDestroyed(final HttpSessionEvent event) {
final HttpSession session = event.getSession();
final LogicalSession logicalSession = new ContainerSession(session);
CsrfGuard.getInstance().onSessionDestroyed(logicalSession);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* The OWASP CSRFGuard Project, BSD License
* Copyright (c) 2011, Eric Sheridan ([email protected])
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of OWASP nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package org.owasp.csrfguard.action;

import org.owasp.csrfguard.CsrfGuard;
import org.owasp.csrfguard.CsrfGuardException;
import org.owasp.csrfguard.config.properties.ConfigParameters;
import org.owasp.csrfguard.session.LogicalSession;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Objects;

/**
* Saves the thrown CsrfGuardException object after a token validation to the session, bound to the attribute name extracted from the properties file.
*/
public final class SessionAttribute extends AbstractAction {

private static final long serialVersionUID = 1367492926060283228L;

@Override
public void execute(final HttpServletRequest request, final HttpServletResponse response, final CsrfGuardException csrfe, final CsrfGuard csrfGuard) throws CsrfGuardException {
final String attributeName = getParameter(ConfigParameters.ACTION_ATTRIBUTE_NAME);

final LogicalSession logicalSession = CsrfGuard.getInstance().getLogicalSessionExtractor().extract(request);

if (Objects.nonNull(logicalSession)) {
logicalSession.setAttribute(attributeName, csrfe);
}
}
}
Loading