Backport of 0ae79014c0 from master
0ae79014c0
This fixes a regression introduced by the 53ff096982 security fix. Thanks to @a1tus for the report and Tim for the review. refs #23329. Backport of 342ccbddc1 from master
53ff096982
342ccbddc1