From 226c31d4d8a2212de7901ec44da7eeb8829ffcfa Mon Sep 17 00:00:00 2001 From: Yoshihiro OKUMURA Date: Fri, 1 Jun 2018 18:10:29 +0900 Subject: [PATCH] fixed infinite loop bug. --- .../admin/actions/UserPassColumnLenFixAction.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xoops_trust_path/modules/xupdate/admin/actions/UserPassColumnLenFixAction.class.php b/xoops_trust_path/modules/xupdate/admin/actions/UserPassColumnLenFixAction.class.php index beecd9e2d..0bb646dfb 100644 --- a/xoops_trust_path/modules/xupdate/admin/actions/UserPassColumnLenFixAction.class.php +++ b/xoops_trust_path/modules/xupdate/admin/actions/UserPassColumnLenFixAction.class.php @@ -48,10 +48,13 @@ private function _userPassColumnLenFix() $add = ' // Alrady fixed length of users table pass column of this DB (Auto inserts by X-update)'."\n"; $add .= ' define(\'XCUBE_CORE_USER_PASS_LEN_FIXED\', true);'."\n\n"; $src = preg_replace($sens, '$0' . $add, $src); + $local = XOOPS_TRUST_PATH.'/'.$this->mod_config['temp_path'].'/mainfile.custom.php'; + file_put_contents($local, $src); $mod = @ fileperms($mainfile); $this->Ftp->localChmod($mainfile, 0606); - file_put_contents($mainfile, $src, LOCK_EX); + $this->Ftp->localPut($local, $mainfile); $this->Ftp->localChmod($mainfile, $mod? $mod : 0404); + @unlink($local); } } }