Skip to content

Csrf failure should not throw blank Error #386

Description

@TheSyscall

The CsrfCounterMeasure class uses Error instead of Exceptions.

Error is PHP's internal error class for engine-level errors, things like TypeError, ParseError, ArithmeticError. These can be caught but generally not be thrown in code.

Providing an invalid CsrfToken leads to a blank Error object to be thrown when it is really an issue with a user provided Exception. Icingaweb provides a InvalidCSRFTokenException, this could be brought over to ipl-web.

Another way an error can be thrown is to call addCsrfCounterMeasure without having a csrfCounterMeasureId or uniqueId set. This should just be a LogicException

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