Skip to content

How to avoid SQL injection in $filter querystring #226

@andenis

Description

@andenis

I'm using Breezejs and .Net Framework 4.5
Example:
ExecuteQuery url:
https://XXXXXX/breeze/Breeze/Departments?$filter=**BranchId eq 123L+or+1+eq+1&**$orderby=Name&$expand=Calls

SQL Generated:
WHERE ([Extent2].[CompanyId] = @p_linq0) AND (1 = CAST( [Extent1].[Status] AS int)) AND ([Extent1].[BranchId] = @plinq1 OR @plinq2 = @plinq_3)

SQL Generated parameters:
N'@p_linq0 bigint,@plinq1 bigint,@plinq2 int,@plinq3 int',@plinq0=826,@plinq1=123,@plinq2=1,@plinq_3=1

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions