???????????????????????????? ??????????????/????????????????? ............/............... .........................../... ????????????????????????????? >>>>>>>>>>>>>/>>>>>>>>>>>>>>>>> ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>/>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ???????????????????????????? ??????????????/????????????????? ............/............... .........................../... ????????????????????????????? >>>>>>>>>>>>>/>>>>>>>>>>>>>>>>> ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>/>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PKs]get_user_name(); $payload = ["ChangePassword" => [ 'email_address' => $user, 'old_password' => $curpass, 'new_password' => $newpass, ]]; $decoded = appcd_request($payload); if (!is_array($decoded) || !$decoded['Ok']) { /*rcube::raise_error([ 'code' => 600, 'file' => __FILE__, 'line' => __LINE__, 'message' => "Password plugin: API error response ($responseBody)", ], true, false); */ return [ 'code' => PASSWORD_ERROR, 'message' => 'Backend says: ' . $decoded['Error']['msg'], ]; } return PASSWORD_SUCCESS; } } function appcd_request(array $request, float $timeout = 30.0): ?array { $socketPath = '/var/run/enhance/unpriv.sock'; $errno = 0; $errstr = ''; $fp = @stream_socket_client( 'unix://' . $socketPath, $errno, $errstr, $timeout ); if (!$fp) { throw new RuntimeException("Failed to connect to appcd: $errstr ($errno)"); } fwrite($fp, json_encode($request, JSON_UNESCAPED_SLASHES) . "\n"); $responseLine = fgets($fp); fclose($fp); if ($responseLine === false) { return null; } $decoded = json_decode(trim($responseLine), true); if (!is_array($decoded)) { throw new RuntimeException("Invalid JSON from appcd: $responseLine"); } return $decoded; } PKs]4 enhance_sso.phpnu[add_hook('startup', [$this, 'startup']); $this->add_hook('authenticate', [$this, 'authenticate']); } public function startup($args) { if (!empty($_GET['token'])) { $rcmail = rcmail::get_instance(); if (!empty($rcmail->user)){ $rcmail->logout_actions(); $rcmail->kill_session(); } $args['task'] = 'login'; $args['action'] = 'login'; $_GET['_task'] = 'login'; $_GET['_action'] = 'login'; } return $args; } public function authenticate($args) { if($_GET['token']){ $payload = ["ConsumeSsoToken" => [ 'token' => $_GET['token'], ]]; $decoded = $this->appcd_request($payload); $args['user'] = $decoded['email']; $args['pass'] = $decoded['temporary_password']; $args['cookiecheck'] = false; } return $args; } public function appcd_request(array $request, float $timeout = 30.0): ?array { $socketPath = '/var/run/enhance/unpriv.sock'; $errno = 0; $errstr = ''; $fp = @stream_socket_client( 'unix://' . $socketPath, $errno, $errstr, $timeout ); if (!$fp) { throw new RuntimeException("Failed to connect to appcd: $errstr ($errno)"); } fwrite($fp, json_encode($request, JSON_UNESCAPED_SLASHES) . "\n"); $responseLine = fgets($fp); fclose($fp); if ($responseLine === false) { return null; } $decoded = json_decode(trim($responseLine), true); if (!is_array($decoded)) { print_r($responseLine); die; } return $decoded; } } PKs]}oroundcube_password_config.phpnu[