Skip to content

Commit fe8bca4

Browse files
committed
Add infrastructure and application code for cloud services
This commit introduces several new files to support cloud infrastructure and application development. Key additions include: - `azuredeploy.json`: ARM template for Azure Web App deployment. - `eks.tf`: Terraform configuration for Amazon EKS cluster setup. - `example.tf`: Terraform resources for Azure networking and VM creation. - `gke.tf`: GKE cluster configuration with logging and monitoring. - `index.js`: Utility functions for file handling in Node.js. - `main-sample1.tf`: AWS CloudFront distribution setup. - `mongodb.go`: MongoDB connection handling with environment variables. - `network.tf`: Azure Application Gateway and networking resources. - `python-routes.py`: Flask routes for querying a book database. - `RegexDoS.aspx.cs`: Web form demonstrating a ReDoS vulnerability. - `server.Dockerfile`: Docker setup for a Python application. - `SqliteDbProvider.cs`: SQLite database provider implementation. - `Util.cs`: Utility functions for process management and logging.
1 parent 0f2c9ce commit fe8bca4

File tree

13 files changed

+1796
-0
lines changed

13 files changed

+1796
-0
lines changed

samples/RegexDoS.aspx.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System;
2+
using System.Web;
3+
using System.Web.UI;
4+
using System.Text.RegularExpressions;
5+
6+
namespace OWASP.WebGoat.NET
7+
{
8+
public partial class RegexDoS : System.Web.UI.Page
9+
{
10+
protected void Page_Load(object sender, EventArgs e)
11+
{
12+
13+
}
14+
15+
/// <summary>
16+
/// Code from https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
17+
/// </summary>
18+
protected void btnCreate_Click(object sender, EventArgs e)
19+
{
20+
string userName = txtUsername.Text;
21+
string password = txtPassword.Text;
22+
23+
Regex testPassword = new Regex(userName);
24+
Match match = testPassword.Match(password);
25+
if (match.Success)
26+
{
27+
lblError.Text = "Do not include name in password.";
28+
}
29+
else
30+
{
31+
lblError.Text = "Good password.";
32+
}
33+
}
34+
}
35+
}
36+

0 commit comments

Comments
 (0)