Skip to content

Conversation

@jallers
Copy link
Contributor

@jallers jallers commented Aug 11, 2025

  • Retarget 4.8
  • Add a timeout to Regular expression

Copilot AI review requested due to automatic review settings August 11, 2025 22:46
Copy link

Copilot AI left a 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
Copy link

Copilot AI Aug 11, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +14
<!--
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>
-->
Copy link
Contributor

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"?>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old junk

Copy link
Contributor

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.

@spazmodius
Copy link
Contributor

I wouldn't cry if the sample web project went away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants