Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security fixes + backwards compatibility with the port 80 #282

Merged
merged 6 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/test_reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v1.8.0
- uses: dorny/test-reporter@v1.9.1
with:
name: TRX Tests
artifact: test-results # artifact name
Expand Down
3 changes: 2 additions & 1 deletion src/OnlineSales/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ RUN dotnet publish "./plugins/OnlineSales.Plugin.SendGrid/OnlineSales.Plugin.Sen
RUN dotnet publish "./plugins/OnlineSales.Plugin.Sms/OnlineSales.Plugin.Sms.csproj" -c Release -o /app/publish/plugins/OnlineSales.Plugin.Sms /p:UseAppHost=false
RUN dotnet publish "./plugins/OnlineSales.Plugin.Vsto/OnlineSales.Plugin.Vsto.csproj" -c Release -o /app/publish/plugins/OnlineSales.Plugin.Vsto /p:UseAppHost=false

FROM base AS final
FROM base AS final
RUN apk add --no-cache icu-libs
RUN apk add --no-cache icu-data-full
ENV ASPNETCORE_URLS=http://+:80
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
WORKDIR /app
COPY --from=publish /app/publish .
Expand Down
2 changes: 1 addition & 1 deletion src/OnlineSales/OnlineSales.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.11" />
<PackageReference Include="CsvHelper" Version="31.0.4" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.3.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.12" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.6.0" />
<PackageReference Include="Unidecode.NET" Version="2.1.0" />
</ItemGroup>

Expand Down
4 changes: 3 additions & 1 deletion src/OnlineSales/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ public static async Task CreateDefaultIdentity(IServiceScope scope)
EmailConfirmed = true,
};

if (await userManager.FindByEmailAsync(user.Email) == null)
var existingUser = await userManager.FindByEmailAsync(user.Email);

if (existingUser == null)
{
var result = await userManager.CreateAsync(user, defaultUser.Password);

Expand Down
1 change: 1 addition & 0 deletions src/OnlineSales/Services/EmailFromTemplateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ private static string EvaluateTemplate(string template, Dictionary<string, strin
}

var result = TokenHelper.ReplaceTokensFromVariables(templateArguments!.ConvertKeys("<%", "%>"), template);
result = TokenHelper.ReplaceTokensFromVariables(templateArguments!.ConvertKeys("&lt;%", "%&gt;"), result); // the case when template is html encoded
result = TokenHelper.ReplaceTokensFromVariables(templateArguments!.ConvertKeys("${", "}"), result);
return result;
}
Expand Down
Loading