Restore SEBPatch

This commit is contained in:
2025-06-01 11:44:20 +02:00
commit 8c656e3137
1297 changed files with 142172 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace SafeExamBrowser.Settings.Browser.Filter
{
/// <summary>
/// Defines all possible results of a request filter operation.
/// </summary>
public enum FilterResult
{
/// <summary>
/// Indicates that a request should be allowed if a filter matches.
/// </summary>
Allow,
/// <summary>
/// Indicates that a request should be blocked if a filter matches.
/// </summary>
Block
}
}

View File

@@ -0,0 +1,34 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using System;
namespace SafeExamBrowser.Settings.Browser.Filter
{
/// <summary>
/// Defines the settings for a request filter rule.
/// </summary>
[Serializable]
public class FilterRuleSettings
{
/// <summary>
/// The expression according to which requests should be filtered.
/// </summary>
public string Expression { get; set; }
/// <summary>
/// The filter result to be used when the <see cref="Expression"/> matches.
/// </summary>
public FilterResult Result { get; set; }
/// <summary>
/// The filter type which defines how the <see cref="Expression"/> is processed.
/// </summary>
public FilterRuleType Type { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace SafeExamBrowser.Settings.Browser.Filter
{
/// <summary>
/// Defines all possible filter rule types.
/// </summary>
public enum FilterRuleType
{
/// <summary>
/// The filter rule is based on a regular expression.
/// </summary>
Regex,
/// <summary>
/// The filter rule is based on a simplified expression with wildcards.
/// </summary>
Simplified
}
}