[Security] Removed unused var
merged branch lyrixx/path-10 (PR #7597)

This PR was merged into the 2.2 branch.

Discussion
----------

[Security] Removed unused var

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | I guess
| Fixed tickets | -

Commits
-------

bd26419 [Security] Removed unused var
Added more verbosity levels. See GH #6066