-
Notifications
You must be signed in to change notification settings - Fork 0
Retarget to 4.8, Add Regex Timeout #7
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
base: master
Are you sure you want to change the base?
Conversation
jallers
commented
Aug 11, 2025
- Retarget 4.8
- Add a timeout to Regular expression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the project from .NET Framework 4.0 to 4.8 and adds regex timeout protection to prevent potential regex denial-of-service attacks.
- Retargets all project files from .NET Framework 4.0 to 4.8
- Updates MSBuild tools version and related configuration settings
- Adds a 1-second timeout to all regex instances to prevent regex DoS vulnerabilities
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| web/web.csproj | Updates target framework to 4.8, MSBuild tools to 12.0, and adds framework references |
| web/Web.config | Updates compilation target framework and adds framework compatibility settings |
| tests/VersionOne.Localization.Tests.csproj | Retargets test project to .NET Framework 4.8 |
| source/VersionOne.Localization.csproj | Retargets main library project to .NET Framework 4.8 |
| source/Localizer.cs | Adds regex timeout to prevent DoS attacks |
| source/.vs/VersionOne.Localization.csproj.dtbcache.json | Generated Visual Studio cache file |
| @@ -0,0 +1 @@ | |||
| {"RootPath":"D:\\source\\VersionOne.Localization\\source","ProjectFileName":"VersionOne.Localization.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"AssemblyInfo.cs"},{"SourceFile":"FileTemplateSetLoader.cs"},{"SourceFile":"LocalizationManager.cs"},{"SourceFile":"Localizer.cs"},{"SourceFile":"TemplateProvider.cs"},{"SourceFile":"TemplateSet.cs"},{"SourceFile":"TextTemplateSet.cs"},{"SourceFile":"Translator.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.0.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\WINDOWS\\Microsoft.Net\\assembly\\GAC_MSIL\\System.Core\\v4.0_4.0.0.0__b77a5c561934e089\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\WINDOWS\\Microsoft.Net\\assembly\\GAC_MSIL\\System\\v4.0_4.0.0.0__b77a5c561934e089\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"D:\\source\\VersionOne.Localization\\source\\bin\\Debug\\VersionOne.Localization.dll","OutputItemRelativePath":"VersionOne.Localization.dll"},{"OutputItemFullPath":"","OutputItemRelativePath":""}],"CopyToOutputEntries":[]} No newline at end of file | |||
Copilot
AI
Aug 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generated Visual Studio cache files should not be committed to version control. This file contains absolute paths and machine-specific information that will differ across development environments. Consider adding .vs/ directory to .gitignore.
| <!-- | ||
| For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367. | ||
| The following attributes can be set on the <httpRuntime> tag. | ||
| <system.Web> | ||
| <httpRuntime targetFramework="4.8" /> | ||
| </system.Web> | ||
| --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
junk
| @@ -1,46 +1,47 @@ | |||
| <?xml version="1.0"?> | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old junk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a library, I don't think this should be using its own, non-configurable regex timeout. It should inherit the one set by it's hosting application.
|
I wouldn't cry if the sample |