マンコ

諏訪子 <suwako@076.moe>、2025-12-12 01:42
コミット 83a6d5c3de2b8d189801f4a58f6fc3fe34dfeff5 ・親 95db2f7 ・ファイルを見る

3個のファイル、+6 -5

@@ -173,7 +173,6 @@
173173 $tmpl->assign('custCss', false);
174174 $tmpl->assign('menu', $this->getMenu());
175175 $tmpl->assign('description', $description);
176- $tmpl->assign('error', $error);
177176 $tmpl->assign('user', $user);
178177 $tmpl->assign('u', $u);
179178
@@ -189,7 +189,7 @@
189189 $user = new \stdClass;
190190 $user->id = $lastId;
191191 $user->username = $username;
192- $user->password = password_hash($password, $algo);
192+ $user->password = password_hash($password, $this->algo);
193193 $user->avatar = '';
194194 $user->email = $email;
195195 $user->regDate = time();
@@ -219,8 +219,8 @@
219219 return \Result::Error('エラー:ユーザー名又はパスワードが一致していません。');
220220 }
221221
222- if (password_needs_rehash($userData->password, $algo)) {
223- $userData->password = password_hash($password, $algo);
222+ if (password_needs_rehash($userData->password, $this->algo)) {
223+ $userData->password = password_hash($password, $this->algo);
224224 $path = $this->dataDir.$this->id.'.'.$userData->username.'.json';
225225 $json = json_encode($userData, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
226226
変更 util.php
@@ -33,7 +33,9 @@
3333
3434 function kys(mixed $arg): void {
3535 if (gettype($arg) == 'boolean') $arg = $arg === true ? 'true' : 'false';
36- foreach ($arg as $a) { if (gettype($a) == 'boolean') $a = $a === true ? 'true' : 'false'; }
36+ if (gettype($arg) == 'array' || gettype($arg) == 'object') {
37+ foreach ($arg as $a) { if (gettype($a) == 'boolean') $a = $a === true ? 'true' : 'false'; }
38+ }
3739 echo '<style>html { color: #fcfcfc; background-color: #232023; } body { margin: 0; }</style>';
3840 echo '<header style="padding: 10px 0; display: flex; justify-content: space-evenly; background-color: #550f75; margin-bottom: 20px; position: sticky; top: 0;"><div><b>K</b>ILL</div> <div><b>Y</b>OUR</div> <div><b>S</b>ELF</div></header>';
3941 echo '<pre>';