Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f6e90c1
Add content security policy (personabar settings, new library and def…
sachatrauwaen Oct 3, 2025
8d7b31c
Unit tests for CSP library
sachatrauwaen Oct 3, 2025
8904876
add documentation
sachatrauwaen Oct 3, 2025
d855d0b
Merge branch 'develop' into dev-csp
sachatrauwaen Oct 3, 2025
9ba68bf
add validation to csp settings ui
sachatrauwaen Oct 4, 2025
30f4ff0
try catch to avoid page error if error in header
sachatrauwaen Oct 5, 2025
aa5fa53
Merge branch 'development' into dev-csp
sachatrauwaen Nov 12, 2025
8bad493
add Csp Header Fixed site setting : governs whether a module can enla…
sachatrauwaen Nov 13, 2025
13003e0
add using for object dispose
sachatrauwaen Nov 15, 2025
d471f49
translate docs to english and remove examples
sachatrauwaen Nov 15, 2025
4caea19
remove AddCsp
sachatrauwaen Nov 15, 2025
3117831
Merge branch 'develop' into dev-csp
sachatrauwaen Nov 15, 2025
fd9026b
fix blank line
sachatrauwaen Nov 15, 2025
c1fa548
Merge branch 'dev-csp' of https://github.com/sachatrauwaen/Dnn.Platfo…
sachatrauwaen Nov 15, 2025
defb1f5
enhance source regexp and precompile regexp
sachatrauwaen Nov 16, 2025
1f8a2cb
fix doc
sachatrauwaen Nov 16, 2025
3b1cb2e
remove data: from image source because dnn home page dont use data im…
sachatrauwaen Nov 16, 2025
20ec007
make csp stuff more readable
sachatrauwaen Nov 16, 2025
3df3de7
cleanup
sachatrauwaen Nov 16, 2025
709ce0f
remove syntax check from all request
sachatrauwaen Nov 17, 2025
cf6086a
Master switch in web.config to disable CSP
donker Nov 26, 2025
7d7880a
Added confirm checkbox for locked feature and adjusted wording
donker Nov 26, 2025
e57770b
Small css adjustments
donker Nov 26, 2025
cc60936
Merge branch 'develop' into dev-csp
donker Nov 26, 2025
20f3c27
Add required CSP for webforms support
donker Nov 26, 2025
d06252c
Merge branch 'dev-csp' into dev-csp-1
donker Nov 26, 2025
07decd0
Merge pull request #13 from donker/dev-csp-1
sachatrauwaen Nov 26, 2025
6c2974a
update default csp setting
sachatrauwaen Nov 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information

namespace DotNetNuke.ContentSecurityPolicy
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

/// <summary>
/// Base class for all CSP directive contributors.
/// </summary>
public abstract class BaseCspContributor
{
/// <summary>
/// Gets unique identifier for the contributor.
/// </summary>
public Guid Id { get; } = Guid.NewGuid();

/// <summary>
/// Gets or sets type of the CSP directive.
/// </summary>
public CspDirectiveType DirectiveType { get; protected set; }

/// <summary>
/// Generates the directive string.
/// </summary>
/// <returns>The directive string.</returns>
public abstract string GenerateDirective();
}
}
Loading