[Security] Fix BC break introduced in #10694

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12034
| License       | MIT


Not sure about this fix, @stof 'ing welcome