-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from ctflearner/DetectSafehttp.bambda
Create DetectSafeHttpMethods.bambda
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Bambda Script to Detect "Safe or Typical HTTP Methods in Requests" | ||
* @author ctflearner | ||
* This script identifies HTTP requests that use typical or safe methods such as GET and POST, | ||
* excluding less common or potentially unsafe methods like PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE, and CONNECT. | ||
* It ensures that the HTTP method is not one of the excluded methods listed. | ||
**/ | ||
|
||
|
||
|
||
return !requestResponse.request().method().equals("PUT") && | ||
!requestResponse.request().method().equals("PATCH") && | ||
!requestResponse.request().method().equals("DELETE") && | ||
!requestResponse.request().method().equals("HEAD") && | ||
!requestResponse.request().method().equals("OPTIONS") && | ||
!requestResponse.request().method().equals("TRACE") && | ||
!requestResponse.request().method().equals("CONNECT"); |