diff options
Diffstat (limited to 'apps/files_external/3rdparty/icewind/smb/src/Parser.php')
-rw-r--r-- | apps/files_external/3rdparty/icewind/smb/src/Parser.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/Parser.php b/apps/files_external/3rdparty/icewind/smb/src/Parser.php index 3142f9c29e0..a30032178b1 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/Parser.php +++ b/apps/files_external/3rdparty/icewind/smb/src/Parser.php @@ -81,6 +81,7 @@ class Parser { * @throws AuthenticationException * @throws InvalidHostException * @throws NoLoginServerException + * @throws AccessDeniedException */ public function checkConnectionError($line) { $line = rtrim($line, ')'); @@ -99,6 +100,9 @@ class Parser { if (substr($line, -26) === ErrorCodes::NoLogonServers) { throw new NoLoginServerException('No login server'); } + if (substr($line, -23) === ErrorCodes::AccessDenied) { + throw new AccessDeniedException('Access denied'); + } } public function parseMode($mode) { @@ -133,7 +137,7 @@ class Parser { return [ 'mtime' => strtotime($data['write_time']), 'mode' => hexdec(substr($data['attributes'], strpos($data['attributes'], '('), -1)), - 'size' => isset($data['stream']) ? intval(explode(' ', $data['stream'])[1]) : 0 + 'size' => isset($data['stream']) ? (int)(explode(' ', $data['stream'])[1]) : 0 ]; } |