[Security] Fixed the check if an interface exists.
merged branch jakzal/bugfix/interface-check (PR #8143)

This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Fixed the check if an interface exists.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

re #8136

Commits
-------

fd151fd [Security] Fixed the check if an interface exists.