Skip to content

Commit 459e612

Browse files
committed
catch all throwables
1 parent 9022958 commit 459e612

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

resources/lib/UnitySite.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,10 @@ public static function testValidSSHKey($key_str)
5656
if ($key_str == "") {
5757
return false;
5858
}
59-
// https://github.com/phpseclib/phpseclib/issues/2077
60-
// key loader still throws exception, this just mutes a warning for phpunit
61-
if (preg_match("/^[0-9]+$/", $key_str)) {
62-
return false;
63-
}
64-
// https://github.com/phpseclib/phpseclib/issues/2076
65-
// key loader still throws exception, this just mutes a warning for phpunit
66-
if (!is_null(@json_decode($key_str))) {
67-
return false;
68-
}
6959
try {
7060
PublicKeyLoader::load($key_str);
7161
return true;
72-
} catch (\Exception $e) {
62+
} catch (\Throwable $e) {
7363
return false;
7464
}
7565
}

0 commit comments

Comments
 (0)