Skip to content

Commit 659d55a

Browse files
authored
Merge pull request #2276 from BEXIS2/rc
Rc
2 parents 20ffd56 + a9773d6 commit 659d55a

File tree

328 files changed

+31760
-2783
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

328 files changed

+31760
-2783
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ csharp_prefer_simple_using_statement = true:suggestion
8484
csharp_style_namespace_declarations = block_scoped:silent
8585
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
8686

87+
# CS1591: Fehledes XML-Kommentar für öffentlich sichtbaren Typ oder Element
88+
dotnet_diagnostic.CS1591.severity = none
89+
8790
[*.vb]
8891
#### Benennungsstile ####
8992

.github/workflows/codeql.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches:
17+
- rc
18+
pull_request:
19+
branches:
20+
- rc
21+
schedule:
22+
- cron: '38 14 * * 4'
23+
24+
jobs:
25+
analyze:
26+
name: Analyze (${{ matrix.language }})
27+
# Runner size impacts CodeQL analysis time. To learn more, please see:
28+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
29+
# - https://gh.io/supported-runners-and-hardware-resources
30+
# - https://gh.io/using-larger-runners (GitHub.com only)
31+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
32+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
33+
permissions:
34+
# required for all workflows
35+
security-events: write
36+
37+
# required to fetch internal or private CodeQL packs
38+
packages: read
39+
40+
# only required for workflows in private repositories
41+
actions: read
42+
contents: read
43+
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
include:
48+
- language: actions
49+
build-mode: none
50+
- language: csharp
51+
build-mode: none
52+
- language: javascript-typescript
53+
build-mode: none
54+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
55+
# Use `c-cpp` to analyze code written in C, C++ or both
56+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
57+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
58+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
59+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
60+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
61+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
62+
steps:
63+
- name: Checkout repository
64+
uses: actions/checkout@v4
65+
66+
# Add any setup steps before running the `github/codeql-action/init` action.
67+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
68+
# or others). This is typically only required for manual builds.
69+
# - name: Setup runtime (example)
70+
# uses: actions/setup-example@v1
71+
72+
# Initializes the CodeQL tools for scanning.
73+
- name: Initialize CodeQL
74+
uses: github/codeql-action/init@v3
75+
with:
76+
languages: ${{ matrix.language }}
77+
build-mode: ${{ matrix.build-mode }}
78+
# If you wish to specify custom queries, you can do so here or in a config file.
79+
# By default, queries listed here will override any specified in a config file.
80+
# Prefix the list here with "+" to use these queries and those in the config file.
81+
82+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
83+
# queries: security-extended,security-and-quality
84+
85+
# If the analyze step fails for one of the languages you are analyzing with
86+
# "We were unable to automatically build your code", modify the matrix above
87+
# to set the build mode to "manual" for that language. Then modify this step
88+
# to build your code.
89+
# ℹ️ Command-line programs to run using the OS shell.
90+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
91+
- if: matrix.build-mode == 'manual'
92+
shell: bash
93+
run: |
94+
echo 'If you are using a "manual" build mode for one or more of the' \
95+
'languages you are analyzing, replace this with the commands to build' \
96+
'your code, for example:'
97+
echo ' make bootstrap'
98+
echo ' make release'
99+
exit 1
100+
101+
- name: Perform CodeQL Analysis
102+
uses: github/codeql-action/analyze@v3
103+
with:
104+
category: "/language:${{matrix.language}}"

.github/workflows/main.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ jobs:
1111

1212
steps:
1313
- name: Checkout repository
14-
uses: actions/checkout@v3
14+
15+
uses: actions/checkout@v4
1516

1617
- name: Install .NET SDK
1718
uses: actions/setup-dotnet@v3
@@ -26,7 +27,9 @@ jobs:
2627
upgrade-assistant analyze BExIS%2B%2B.sln --format json > upgrade-report.json
2728
2829
- name: Upload report artifact
29-
uses: actions/[email protected]
30+
31+
uses: actions/upload-artifact@v4
32+
3033
with:
3134
name: upgrade-report
3235
path: upgrade-report.json

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,4 @@ svelte
281281
/Console/BExIS.Web.Shell/Areas/RPM/BExIS.Modules.Rpm.UI/Scripts/svelte
282282
/_output
283283
/Console/BExIS.Web.Shell/Web.config
284+
/Console/BExIS.Web.Shell/Areas/SMM/BExIS.Modules.SMM.UI/Properties/PublishProfiles/FolderProfile.pubxml

BExIS++.sln

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BExIS.Ext.Orm.NH", "Compone
230230
EndProject
231231
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BExIS.Modules.Dim.UI", "Console\BExIS.Web.Shell\Areas\DIM\BExIS.Modules.Dim.UI\BExIS.Modules.Dim.UI.csproj", "{9BFFFD11-03C6-47DF-9CC9-F458A9A49377}"
232232
EndProject
233+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SMM", "SMM", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
234+
EndProject
235+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BExIS.Modules.SMM.UI", "Console\BExIS.Web.Shell\Areas\SMM\BExIS.Modules.SMM.UI\BExIS.Modules.SMM.UI.csproj", "{37402CAB-EB81-4D08-8791-8653949C0FEB}"
236+
EndProject
233237
Global
234238
GlobalSection(SolutionConfigurationPlatforms) = preSolution
235239
Debug|Any CPU = Debug|Any CPU
@@ -1486,6 +1490,24 @@ Global
14861490
{9BFFFD11-03C6-47DF-9CC9-F458A9A49377}.TestServerRelease|Mixed Platforms.Build.0 = TestServerRelease|Any CPU
14871491
{9BFFFD11-03C6-47DF-9CC9-F458A9A49377}.TestServerRelease|x86.ActiveCfg = TestServerRelease|Any CPU
14881492
{9BFFFD11-03C6-47DF-9CC9-F458A9A49377}.TestServerRelease|x86.Build.0 = TestServerRelease|Any CPU
1493+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1494+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
1495+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
1496+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
1497+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.Debug|x86.ActiveCfg = Debug|Any CPU
1498+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.Debug|x86.Build.0 = Debug|Any CPU
1499+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
1500+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.Release|Any CPU.Build.0 = Release|Any CPU
1501+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
1502+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
1503+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.Release|x86.ActiveCfg = Release|Any CPU
1504+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.Release|x86.Build.0 = Release|Any CPU
1505+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.TestServerRelease|Any CPU.ActiveCfg = TestServerRelease|Any CPU
1506+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.TestServerRelease|Any CPU.Build.0 = TestServerRelease|Any CPU
1507+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.TestServerRelease|Mixed Platforms.ActiveCfg = TestServerRelease|Any CPU
1508+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.TestServerRelease|Mixed Platforms.Build.0 = TestServerRelease|Any CPU
1509+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.TestServerRelease|x86.ActiveCfg = TestServerRelease|Any CPU
1510+
{37402CAB-EB81-4D08-8791-8653949C0FEB}.TestServerRelease|x86.Build.0 = TestServerRelease|Any CPU
14891511
EndGlobalSection
14901512
GlobalSection(SolutionProperties) = preSolution
14911513
HideSolutionNode = FALSE
@@ -1580,6 +1602,8 @@ Global
15801602
{AF3D9C1F-968A-46DD-86FB-6B45020DF4E3} = {CD986786-CEA1-4C30-983E-169C33600BA6}
15811603
{C48DCFC5-DF47-4486-A682-5C648F970318} = {CD986786-CEA1-4C30-983E-169C33600BA6}
15821604
{9BFFFD11-03C6-47DF-9CC9-F458A9A49377} = {F3354AC7-CDA1-44E2-8E85-8DB532ED8C75}
1605+
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {692AFF14-3A57-47D8-912F-093EC8F561C4}
1606+
{37402CAB-EB81-4D08-8791-8653949C0FEB} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
15831607
EndGlobalSection
15841608
GlobalSection(ExtensibilityGlobals) = postSolution
15851609
SolutionGuid = {9B6E4921-8EBA-487D-A098-3E473A0EAC64}

Components/AAA/BExIS.Security.Services/Subjects/UserManager.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ public Task<bool> DeleteByIdAsync(long userId)
125125
//return Task.FromException(new Exception());
126126
return Task.FromResult(false);
127127

128+
// Logins
129+
var loginsRepository = _guow.GetRepository<Login>();
130+
foreach (var login in loginsRepository.Get(l => l.User.Id == userId))
131+
{
132+
loginsRepository.Delete(login);
133+
}
134+
128135
// EntityPermissions
129136
var entityPermissionRepository = _guow.GetRepository<EntityPermission>();
130137
foreach (var entityPermission in entityPermissionRepository.Get(e => e.Subject.Id == userId))

Components/App/BExIS.App.Bootstrap/Attributes/BExISAuthorizeAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
using BExIS.Security.Services.Authorization;
55
using BExIS.Security.Services.Objects;
66
using BExIS.Security.Services.Subjects;
7-
using BExIS.Utils.Config;
87
using System;
98
using System.Linq;
109
using System.Net;
1110
using System.Web;
1211
using System.Web.Mvc;
12+
using BExIS.Utils.Config;
1313

1414
namespace BExIS.App.Bootstrap.Attributes
1515
{
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using BExIS.Security.Entities.Requests;
2+
using System.Web.Helpers;
3+
using System.Web.Mvc;
4+
5+
namespace BExIS.App.Bootstrap.Attributes
6+
{
7+
public class CustomValidateAntiForgeryToken: FilterAttribute, IAuthorizationFilter
8+
{
9+
public void OnAuthorization(AuthorizationContext filterContext)
10+
{
11+
var request = filterContext.HttpContext.Request;
12+
13+
if (filterContext.HttpContext.Request.HttpMethod == "POST")
14+
{
15+
var cookieToken = request.Cookies[AntiForgeryConfig.CookieName]?.Value;
16+
17+
// check for token in form data
18+
var formToken = request.Form["__RequestVerificationToken"];
19+
20+
// check header for post from javascript
21+
22+
if (formToken==null)
23+
{
24+
formToken = request.Headers["__RequestVerificationToken"];
25+
}
26+
27+
if (cookieToken != null)
28+
{
29+
AntiForgery.Validate(cookieToken, formToken);
30+
}
31+
32+
//AntiForgery.Validate();
33+
}
34+
}
35+
}
36+
}

Components/App/BExIS.App.Bootstrap/BExIS.App.Bootstrap.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
<Compile Include="Attributes\MinCapacityAttribute.cs" />
113113
<Compile Include="Attributes\NoNullOrEmptyItemsAttribute.cs" />
114114
<Compile Include="Attributes\ThrottlingFilterAttribute.cs" />
115+
<Compile Include="Attributes\CustomValidateAntiForgeryToken.cs" />
115116
<Compile Include="Extensions\AuthorizationContextExtensions.cs" />
116117
<Compile Include="Helpers\BExISAuthorizeHelper.cs" />
117118
<Compile Include="Helpers\JwtHelper.cs" />
@@ -131,7 +132,7 @@
131132
<Name>BExIS.Ext.Services</Name>
132133
</ProjectReference>
133134
<ProjectReference Include="..\..\Utils\BExIS.Utils.Config\BExIS.Utils.Config.csproj">
134-
<Project>{6ead7d02-02f7-42ff-85e4-90bb892d3846}</Project>
135+
<Project>{6EAD7D02-02F7-42FF-85E4-90BB892D3846}</Project>
135136
<Name>BExIS.Utils.Config</Name>
136137
</ProjectReference>
137138
<ProjectReference Include="..\..\Utils\BExIS.Utils.Data\BExIS.Utils.Data.csproj">

Components/App/BExIS.App.Testing/BExIS.App.Testing.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
</ItemGroup>
104104
<ItemGroup>
105105
<ProjectReference Include="..\..\Utils\BExIS.Utils.Config\BExIS.Utils.Config.csproj">
106-
<Project>{6ead7d02-02f7-42ff-85e4-90bb892d3846}</Project>
106+
<Project>{6EAD7D02-02F7-42FF-85E4-90BB892D3846}</Project>
107107
<Name>BExIS.Utils.Config</Name>
108108
</ProjectReference>
109109
<ProjectReference Include="..\..\Vaiona\Vaiona.IoC\Vaiona.IoC.csproj">

0 commit comments

Comments
 (0)