Skip to content

Commit

Permalink
added APINoCleanseDto from API library
Browse files Browse the repository at this point in the history
  • Loading branch information
lanesCSO committed Apr 10, 2024
1 parent e9b7db5 commit 4250e0a
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 2 deletions.
Binary file added rls/0.0.3BETA/CSO.Sanitizer.BETA.0.0.3.nupkg
Binary file not shown.
135 changes: 135 additions & 0 deletions rls/0.0.3BETA/net8.0/CSO.Sanitizer.deps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"CSO.Sanitizer/0.0.3": {
"dependencies": {
"HtmlSanitizer": "8.0.843",
"Newtonsoft.Json": "13.0.3"
},
"runtime": {
"CSO.Sanitizer.dll": {}
}
},
"AngleSharp/0.17.1": {
"dependencies": {
"System.Buffers": "4.5.1",
"System.Text.Encoding.CodePages": "6.0.0"
},
"runtime": {
"lib/netstandard2.0/AngleSharp.dll": {
"assemblyVersion": "0.17.1.0",
"fileVersion": "0.17.1.0"
}
}
},
"AngleSharp.Css/0.17.0": {
"dependencies": {
"AngleSharp": "0.17.1"
},
"runtime": {
"lib/net7.0/AngleSharp.Css.dll": {
"assemblyVersion": "0.17.0.0",
"fileVersion": "0.17.0.0"
}
}
},
"HtmlSanitizer/8.0.843": {
"dependencies": {
"AngleSharp": "0.17.1",
"AngleSharp.Css": "0.17.0",
"System.Collections.Immutable": "8.0.0"
},
"runtime": {
"lib/netstandard2.0/HtmlSanitizer.dll": {
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.843.0"
}
}
},
"Newtonsoft.Json/13.0.3": {
"runtime": {
"lib/net6.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.3.27908"
}
}
},
"System.Buffers/4.5.1": {},
"System.Collections.Immutable/8.0.0": {},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {},
"System.Text.Encoding.CodePages/6.0.0": {
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
}
}
},
"libraries": {
"CSO.Sanitizer/0.0.3": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"AngleSharp/0.17.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-5MPI4bbixlwxb0W/smOMeIR+QlxMy5/5jD+WnIAw4pBC+7AhLPe5bS3cLgQMJyvd6q0A48sG+uYOt/ep406GLA==",
"path": "anglesharp/0.17.1",
"hashPath": "anglesharp.0.17.1.nupkg.sha512"
},
"AngleSharp.Css/0.17.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-bg0AcugmX6BFEi/DHG61QrwRU8iuiX4H8LZehdIzYdqOM/dgb3BsCTzNIcc1XADn4+xfQEdVwJYTSwUxroL4vg==",
"path": "anglesharp.css/0.17.0",
"hashPath": "anglesharp.css.0.17.0.nupkg.sha512"
},
"HtmlSanitizer/8.0.843": {
"type": "package",
"serviceable": true,
"sha512": "sha512-XfmHK4rFz9PPN0gcv7J7pc+MRpcni1mrnO04mwA+9/1zIHLgdOvLJeDwWnX5a+up4tioPvGreB+p+KljLJ32wg==",
"path": "htmlsanitizer/8.0.843",
"hashPath": "htmlsanitizer.8.0.843.nupkg.sha512"
},
"Newtonsoft.Json/13.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==",
"path": "newtonsoft.json/13.0.3",
"hashPath": "newtonsoft.json.13.0.3.nupkg.sha512"
},
"System.Buffers/4.5.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
"path": "system.buffers/4.5.1",
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
},
"System.Collections.Immutable/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==",
"path": "system.collections.immutable/8.0.0",
"hashPath": "system.collections.immutable.8.0.0.nupkg.sha512"
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
"path": "system.runtime.compilerservices.unsafe/6.0.0",
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
},
"System.Text.Encoding.CodePages/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ZFCILZuOvtKPauZ/j/swhvw68ZRi9ATCfvGbk1QfydmcXBkIWecWKn/250UH7rahZ5OoDBaiAudJtPvLwzw85A==",
"path": "system.text.encoding.codepages/6.0.0",
"hashPath": "system.text.encoding.codepages.6.0.0.nupkg.sha512"
}
}
}
Binary file added rls/0.0.3BETA/net8.0/CSO.Sanitizer.dll
Binary file not shown.
Binary file added rls/0.0.3BETA/net8.0/CSO.Sanitizer.pdb
Binary file not shown.
6 changes: 6 additions & 0 deletions src/CSO.Sanitizer/Attributes/CustomPropertyAttributes.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
namespace CSO.Sanitizer
{
/// <summary>
///This checks for the APINoCleanseDto attribute
///Asserting this attribute means that request parameters will not be cleansed
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
public class APINoCleanseDto : Attribute { }

/// <summary>
/// If an object contains contains a parameter with the NoHtmlStrip attribute then no HTML tags will be stripped when passed to the Sanitizer
Expand Down
4 changes: 2 additions & 2 deletions src/CSO.Sanitizer/CSO.Sanitizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<PackageId>CSO.Sanitizer.BETA</PackageId>
<Product>CSO Sanitizer</Product>
<Copyright>Central Statistics Office, Ireland</Copyright>
<Version>0.0.2</Version>
<Version>0.0.3</Version>
<Authors>Central Statistics Office, Ireland</Authors>
<SignAssembly>False</SignAssembly>
<RepositoryUrl>https://github.com/CSOIreland/CSOSanitizer</RepositoryUrl>
<PackageReleaseNotes>
- [ENHANCEMENT] updated to latest sanitizer library - (https://github.com/mganss/HtmlSanitizer/releases/tag/v8.0.843)
- [ENHANCEMENT] moved APINoCleanseDto from API to cso sanitizer
</PackageReleaseNotes>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestoreLockedMode>true</RestoreLockedMode>
Expand Down

0 comments on commit 4250e0a

Please sign in to comment.