Skip to content

Commit

Permalink
パスワード生成時の種にipアドレスを使用しない。
Browse files Browse the repository at this point in the history
  • Loading branch information
satopian committed Nov 29, 2024
1 parent a67ac90 commit 6246317
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions petitnote/index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//Petit Note (c)さとぴあ @satopian 2021-2024
//1スレッド1ログファイル形式のスレッド式画像掲示板
$petit_ver='v1.60.3';
$petit_ver='v1.60.5';
$petit_lot='lot.20241129';

$lang = ($http_langs = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '')
Expand Down Expand Up @@ -244,7 +244,7 @@ function post(){

$pwd=$pwd ? $pwd : t(filter_input(INPUT_COOKIE,'pwdc'));//未入力ならCookieのパスワード
if(!$pwd){//それでも$pwdが空なら
$pwd = substr(hash('sha256', $userip.random_bytes(16)), 0, 15);
$pwd = substr(hash('sha256', random_bytes(16)), 0, 15);
}
if(strlen($pwd) < 6) return error($en? 'The password is too short. At least 6 characters.':'パスワードが短すぎます。最低6文字。');

Expand Down

0 comments on commit 6246317

Please sign in to comment.