Skip to content

Commit

Permalink
fix: input not properly sanitized
Browse files Browse the repository at this point in the history
  • Loading branch information
jaensen committed Oct 28, 2024
1 parent b3e0e09 commit e4638ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Circles.Index.Query/OrderBy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public record OrderBy(string Column, string SortOrder) : ISql
{
public ParameterizedSql ToSql(IDatabaseUtils database)
{
var sql = $"{QuoteIdentifier(Column)} {SortOrder.ToUpper()}";
var sql = $"{QuoteIdentifier(Column)} {(SortOrder.ToUpper() == "DESC" ? "DESC" : "ASC")}";
return new ParameterizedSql(sql, Enumerable.Empty<IDbDataParameter>());
}

Expand Down
4 changes: 2 additions & 2 deletions Circles.Index/Circles.Index.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<Authors>Daniel Janz (Gnosis Service GmbH)</Authors>
<Copyright>Gnosis Service GmbH</Copyright>
<Product>Circles</Product>
<AssemblyVersion>1.10.0</AssemblyVersion>
<FileVersion>1.10.0</FileVersion>
<AssemblyVersion>1.10.1</AssemblyVersion>
<FileVersion>1.10.1</FileVersion>
</PropertyGroup>


Expand Down

0 comments on commit e4638ad

Please sign in to comment.