Plugin Directory

Changeset 3240433


Ignore:
Timestamp:
02/14/2025 06:08:10 AM (10 months ago)
Author:
tmatsuur
Message:

[Update] login rebuilder:2.8.7 The issue has been fixed, and the password can now be reset.

Location:
login-rebuilder/trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • login-rebuilder/trunk/languages/login-rebuilder-ja.po

    r2758890 r3240433  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2018-04-18 15:48+0900\n"
    6 "PO-Revision-Date: 2022-07-12 17:21:55+09:00\n"
     6"PO-Revision-Date: 2023-03-28 10:59:08+09:00\n"
    77"Last-Translator: takenori matsuura <[email protected]>\n"
    88"Language-Team: \n"
     
    1414"X-Poedit-Basepath: C:/Program Files (x86)/Apache Software Foundation/Apache2.4/htdocs\n"
    1515"X-Poedit-SourceCharset: UTF-8\n"
    16 "X-Generator: Poppoppoo/0.9.0\n"
     16"X-Generator: Poppoppoo/0.9.3\n"
    1717"X-Poedit-SearchPath-0: wp-content/plugins/login-rebuilder\n"
    1818
     
    3434msgstr "無効なリクエスト時の応答 "
    3535
    36 #: includes/form-properties.php:31 includes/form-properties.php:142
     36#: includes/form-properties.php:31 includes/form-properties.php:164
    3737msgid "403 status"
    3838msgstr "403ステータス"
     
    5050msgstr "ログインファイル キーワード"
    5151
    52 #: includes/form-properties.php:62
     52#: includes/form-properties.php:84
    5353msgid "New login file"
    5454msgstr "新しいログインファイル"
    5555
    56 #: includes/form-properties.php:86 includes/form-xmlrpc-properties.php:84
     56#: includes/form-properties.php:108 includes/form-xmlrpc-properties.php:84
    5757msgid "Secondary login file"
    5858msgstr "第2ログインファイル"
    5959
    60 #: includes/form-properties.php:87 includes/form-xmlrpc-properties.php:85
     60#: includes/form-properties.php:109 includes/form-xmlrpc-properties.php:85
    6161msgid "in preparation"
    6262msgstr "準備中"
    6363
    64 #: includes/form-properties.php:93
     64#: includes/form-properties.php:115
    6565msgid "working"
    6666msgstr "稼働中"
    6767
    68 #: includes/form-properties.php:96
     68#: includes/form-properties.php:118
    6969msgid "Logging"
    7070msgstr "ログ保存"
    7171
    72 #: includes/form-properties.php:97
     72#: includes/form-properties.php:117
    7373msgid "off"
    7474msgstr "しない"
    7575
    76 #: includes/form-properties.php:98
     76#: includes/form-properties.php:119
    7777msgid "invalid request only"
    7878msgstr "無効なリクエスト時のみ "
    7979
    80 #: includes/form-properties.php:99
     80#: includes/form-properties.php:121
    8181msgid "login only"
    8282msgstr "ログイン時のみ"
    8383
    84 #: includes/form-properties.php:102
     84#: includes/form-properties.php:124
    8585msgid "all"
    8686msgstr "すべて"
    8787
    88 #: includes/form-properties.php:104
     88#: includes/form-properties.php:126
    8989msgid "Number of invalid logs"
    9090msgstr "無効なリクエストのログ件数"
    9191
    92 #: includes/form-properties.php:138
     92#: includes/form-properties.php:160
    9393msgid "Number of login logs"
    9494msgstr "ログインのログ件数"
    9595
    96 #: includes/form-properties.php:141
     96#: includes/form-properties.php:163
    9797msgid "Browsing to the Author page"
    9898msgstr "著者ページの閲覧"
    9999
    100 #: includes/form-properties.php:149
     100#: includes/form-properties.php:171
    101101msgid "accept"
    102102msgstr "受け入れる"
    103103
    104 #: includes/form-properties.php:152
     104#: includes/form-properties.php:174
    105105msgid "oEmbed"
    106106msgstr "oEmbed"
    107107
    108 #: includes/form-properties.php:153
     108#: includes/form-properties.php:173
    109109msgid "Default"
    110110msgstr "標準"
    111111
    112 #: includes/form-properties.php:154
     112#: includes/form-properties.php:176
    113113msgid "Hide the author name and url of the response data."
    114114msgstr "レスポンスデータの投稿者名とURLを隠す。"
    115115
    116 #: includes/form-properties.php:181
     116#: includes/form-properties.php:203
    117117msgid "Don't output response data and links of head element."
    118118msgstr "head要素内のリンクとレスポンスデータを出力しない。"
    119119
    120 #: includes/form-properties.php:184
     120#: includes/form-properties.php:206
    121121msgid "Other"
    122122msgstr "その他"
    123123
    124 #: includes/form-properties.php:185
     124#: includes/form-properties.php:205
    125125msgid "Change the error message at login to ambiguous content."
    126126msgstr "ログイン時のエラーメッセージをあいまいな内容に変更する。"
    127127
    128 #: includes/form-properties.php:186
     128#: includes/form-properties.php:208
    129129msgid "Authentication using a email address and a password is prohibited."
    130130msgstr "メールアドレスとパスワードによる認証を禁止する。"
    131131
    132 #: includes/form-properties.php:188
     132#: includes/form-properties.php:210
    133133msgid "Reject the registration form."
    134134msgstr "登録フォームを拒絶する。"
    135135
    136 #: includes/form-properties.php:170
     136#: includes/form-properties.php:192
    137137msgid "Log file contains a heading line."
    138138msgstr "ログファイルに見出しを付ける。"
    139139
    140 #: includes/form-properties.php:163 includes/form-properties.php:170
     140#: includes/form-properties.php:185 includes/form-properties.php:192
    141141msgid "Notify by email when the administrator login."
    142142msgstr "管理者のログインを通知する。"
    143143
    144 #: includes/form-properties.php:199
     144#: includes/form-properties.php:221
    145145msgid "Test"
    146146msgstr "テスト"
    147147
    148 #: includes/form-properties.php:241 login-rebuilder.php:409
     148#: includes/form-properties.php:263 login-rebuilder.php:491
    149149msgid "View log"
    150150msgstr "ログを表示"
    151151
    152 #: includes/form-properties.php:230 login-rebuilder.php:419
     152#: includes/form-properties.php:252 login-rebuilder.php:501
    153153msgid "Log of invalid request"
    154154msgstr "無効なリクエスト時のログ"
    155155
    156 #: includes/form-properties.php:291
     156#: includes/form-properties.php:327
    157157msgid "Log of login"
    158158msgstr "ログインのログ"
    159159
    160 #: includes/form-properties.php:308 login-rebuilder.php:3093
    161 #: login-rebuilder.php:3095
     160#: includes/form-properties.php:344 login-rebuilder.php:3372
     161#: login-rebuilder.php:3374
    162162msgid "The case of the sub-site, you can not contain '/' in the path name. Please change a path name."
    163163msgstr "サブサイトでは、'/'を含んだパス名を指定できません。パス名を変更してください。"
    164164
    165 #: includes/form-properties.php:310 login-rebuilder.php:3098
     165#: includes/form-properties.php:346 login-rebuilder.php:3377
    166166msgid "File exists, "
    167167msgstr "ファイルあり, "
    168168
    169 #: includes/form-properties.php:312
     169#: includes/form-properties.php:348
    170170msgid "File not found, "
    171171msgstr "ファイルなし, "
    172172
    173 #: includes/form-properties.php:315
     173#: includes/form-properties.php:351
    174174msgid "Writing is possible"
    175175msgstr "書き込み可能"
    176176
    177 #: includes/form-xmlrpc-properties.php:16 login-rebuilder.php:816
    178 #: login-rebuilder.php:816
     177#: includes/form-xmlrpc-properties.php:16 login-rebuilder.php:989
     178#: login-rebuilder.php:989
    179179msgid "Writing is impossible"
    180180msgstr "書き込み不可"
     
    221221msgstr "受け付けるピンバックを最大 %s 件 / %s 秒とする。"
    222222
    223 #: includes/form-xmlrpc-properties.php:74 login-rebuilder.php:2184
     223#: includes/form-xmlrpc-properties.php:74 login-rebuilder.php:2375
    224224#, php-format
    225225msgid "If the number of received pingback has exceeded the limit it refuses to accept %s minutes."
    226226msgstr "ピンバックが受付制限を超過した場合に受付を %s 分間拒絶する。"
    227227
    228 #: includes/form-xmlrpc-properties.php:74 login-rebuilder.php:2450
     228#: includes/form-xmlrpc-properties.php:74 login-rebuilder.php:2698
    229229#, php-format
    230230msgid "It rejects the reception from %s"
    231231msgstr "%s から受付を拒絶"
    232232
    233 #: includes/form-xmlrpc-properties.php:75 login-rebuilder.php:2186
     233#: includes/form-xmlrpc-properties.php:75 login-rebuilder.php:2377
    234234msgid "Acceptance resumes"
    235235msgstr "受付を再開"
    236236
    237 #: login-rebuilder.php:425
     237#: login-rebuilder.php:507
    238238msgid "Accepting"
    239239msgstr "受付中"
    240240
    241 #: login-rebuilder.php:844 login-rebuilder.php:847
     241#: login-rebuilder.php:1017 login-rebuilder.php:1020
    242242msgid "Log of pingback"
    243243msgstr "ピンバックのログ"
    244244
    245 #: login-rebuilder.php:852
     245#: login-rebuilder.php:1025
    246246msgid "Please check your inbox for a confirmation email."
    247247msgstr "確認メールをチェックしてください。"
    248248
    249 #: login-rebuilder.php:855
     249#: login-rebuilder.php:1028
    250250msgid "New login file is system file. Please change a path name."
    251251msgstr "指定されたログインファイル名は予約されています。パス名を変更してください。"
    252252
    253 #: login-rebuilder.php:858
     253#: login-rebuilder.php:1031
    254254msgid "The case of the sub-site, new login file is invalid. Please change a path name."
    255255msgstr "サブサイトでは指定されたログインファイル名は無効です。パス名を変更してください。"
    256256
    257 #: login-rebuilder.php:861
     257#: login-rebuilder.php:1034
    258258msgid "Login file for subscriber is invalid. Please change a path name."
    259259msgstr "指定された購読者専用ログインファイル名は予約されています。パス名を変更してください。"
    260260
    261 #: login-rebuilder.php:864
     261#: login-rebuilder.php:1037
    262262msgid "The case of the sub-site, login file for subscriber is invalid. Please change a path name."
    263263msgstr "サブサイトでは指定された購読者専用ログインファイル名は無効です。パス名を変更してください。"
    264264
    265 #: login-rebuilder.php:1029
     265#: login-rebuilder.php:1223
    266266msgid "User role to use the secondary login file is not selected. Please select at least one role."
    267267msgstr "第2ログインファイルの権限グループが選択されていません。1つの以上の権限グループを選択してください。"
    268268
    269 #: login-rebuilder.php:1036 login-rebuilder.php:1045 login-rebuilder.php:1060
    270 #: login-rebuilder.php:2456
     269#: login-rebuilder.php:1230 login-rebuilder.php:1239 login-rebuilder.php:1254
     270#: login-rebuilder.php:2704
    271271msgid ""
    272272"However, failed to write a new login file to disk.\n"
     
    276276"ディスクを書き込み可能に変更するか、手動でアップロードしてください。"
    277277
    278 #: login-rebuilder.php:1038
     278#: login-rebuilder.php:1232
    279279msgid "Options saved."
    280280msgstr "設定を保存しました。"
    281281
    282 #: login-rebuilder.php:1051
     282#: login-rebuilder.php:1245
    283283msgid ""
    284284"However, failed to write a login file for subscriber to disk.\n"
     
    288288"ディスクを書き込み可能に変更するか、手動でアップロードしてください。"
    289289
    290 #: login-rebuilder.php:1055
     290#: login-rebuilder.php:1249
    291291msgid "However, a new login file was not found."
    292292msgstr "ただし、新しいログインファイルが見つかりませんでした。"
    293293
    294 #: login-rebuilder.php:1080
     294#: login-rebuilder.php:1274
    295295msgid "However, the contents of a new login file are not in agreement."
    296296msgstr "ただし、ログインファイルの内容がおかしい可能性があります。"
    297297
    298 #: login-rebuilder.php:2043 login-rebuilder.php:2134
     298#: login-rebuilder.php:2248 login-rebuilder.php:2339
    299299msgid "Expiration date of this page has expired."
    300300msgstr "ページの有効期間が切れています。"
    301301
    302 #: login-rebuilder.php:2057 login-rebuilder.php:2209
     302#: login-rebuilder.php:2262 login-rebuilder.php:2400
    303303msgid "Request datetime - Username(Requesting IP)"
    304304msgstr "リクエスト日時 - ユーザー名(リクエスト元IP)"
    305305
    306 #: login-rebuilder.php:2057
     306#: login-rebuilder.php:2262
    307307msgid "Notice"
    308308msgstr "補足"
    309309
    310 #: login-rebuilder.php:2190
     310#: login-rebuilder.php:2381
    311311msgid "It will display the '(XMLRPC)' In the case of XML-RPC request."
    312312msgstr "XML-RPCリクエスト時は'(XMLRPC)'が表示されます。"
    313313
    314 #: login-rebuilder.php:2189
     314#: login-rebuilder.php:2390 login-rebuilder.php:2577
    315315msgid "Request datetime - Requesting IP|Status|From Hostname|(Error)"
    316316msgstr "リクエスト日時 - リクエスト元IP|状態|ピング元ホスト名|(エラー)"
    317317
    318 #: login-rebuilder.php:2209
     318#: login-rebuilder.php:2400
    319319msgid "(Unknown)"
    320320msgstr "(不明)"
    321321
    322 #: login-rebuilder.php:2209
     322#: login-rebuilder.php:2400
    323323msgid "'A' is accept."
    324324msgstr "'A'は受付です。"
    325325
    326 #: login-rebuilder.php:2431 login-rebuilder.php:2438 login-rebuilder.php:2445
     326#: login-rebuilder.php:2679 login-rebuilder.php:2686 login-rebuilder.php:2693
    327327msgid "'R' is refuse."
    328328msgstr "'R'は拒否です。"
    329329
    330 #: login-rebuilder.php:2453
     330#: login-rebuilder.php:2701
    331331msgid "Please specify a value of 1 or more."
    332332msgstr "1以上の値を指定してください。"
     
    336336msgstr "ピンバックの受付を再開しました。"
    337337
    338 #: includes/form-properties.php:51
     338#: includes/form-properties.php:52
    339339msgid "This plug-in will make a new login page for your site."
    340340msgstr "このプラグインは新しいログインページを作ります。"
    341341
    342 #: includes/form-properties.php:52
     342#: includes/form-properties.php:53
    343343msgid "Important: If you enable this setting, you can not login if the file specified below exists."
    344344msgstr "【重要】この設定をオンにし、指定されたファイルが存在する場合はログインできません。"
    345345
    346 #: login-rebuilder.php:3093
     346#: login-rebuilder.php:3372
    347347msgid "Use lock file"
    348348msgstr "ロックファイルを使用"
    349349
    350 #: login-rebuilder.php:3095 login-rebuilder.php:3098
     350#: login-rebuilder.php:3374 login-rebuilder.php:3377
    351351msgid "No login allowed"
    352352msgstr "ログイン不可"
    353353
    354 #: login-rebuilder.php:2166
     354#: login-rebuilder.php:2357
    355355msgid "Login possible"
    356356msgstr "ログイン可"
    357357
    358 #: includes/form-properties.php:56
     358#: includes/form-properties.php:57
    359359msgid "Lock file"
    360360msgstr "ロックファイル"
    361361
    362 #: login-rebuilder.php:3117
     362#: login-rebuilder.php:3395
    363363msgid "Show locked status on pop-up re-login form."
    364364msgstr "ポップアップされた再ログインフォームにロック状態を表示する。"
    365365
    366 #: includes/form-properties.php:187
     366#: includes/form-properties.php:209
    367367msgid "Authentication is locked, please login after unlocking."
    368368msgstr "認証ロック中: ロックを解除してからログインしてください。"
    369369
    370 #: includes/form-properties.php:252 login-rebuilder.php:431
     370#: includes/form-properties.php:274 login-rebuilder.php:513
    371371msgid "Deny the REST API / Users if not logged in."
    372372msgstr "ログインしていない場合はREST API / Usersを拒否する。"
    373373
    374 #: login-rebuilder.php:2254
     374#: login-rebuilder.php:2445
    375375msgid "Log of denied REST API"
    376376msgstr "拒否したREST APIのログ"
    377377
    378 #: login-rebuilder.php:3183
     378#: login-rebuilder.php:3461
    379379msgid "Request datetime - Requesting IP | URI"
    380380msgstr "リクエスト日時 - リクエスト元IP | URI "
    381381
    382 #: includes/form-properties.php:105
     382#: includes/form-properties.php:125
    383383msgid "Sorry, you are not allowed to this requests."
    384384msgstr "Sorry, you are not allowed to this requests."
    385385
    386 #: includes/form-properties.php:106
     386#: includes/form-properties.php:128
    387387msgid "Number of pingback logs"
    388388msgstr "Pingbackのログ件数"
    389389
    390 #: includes/form-properties.php:112 includes/form-properties.php:114
     390#: includes/form-properties.php:134 includes/form-properties.php:136
    391391msgid "Number of deny rest api logs"
    392392msgstr "拒否したREST APIのログ件数"
    393393
    394 #: includes/form-properties.php:121
     394#: includes/form-properties.php:143
    395395msgid "Format for displaying date and time of log"
    396396msgstr "ログの日時の表示書式"
    397397
    398 #: includes/form-properties.php:144
     398#: includes/form-properties.php:166
    399399msgid "Use site settings"
    400400msgstr "サイト設定を利用"
    401401
    402 #: includes/form-properties.php:132
     402#: includes/form-properties.php:154
    403403msgid "If you restrict browsing to the Author page, no \"users\" sitemap is created. (WordPress 5.5. 0 or later)"
    404404msgstr "著者ページの閲覧を制限すると、usersサイトマップは作成されません。(WordPress 5.5.0以降)"
    405405
    406 #: includes/form-properties.php:160
     406#: includes/form-properties.php:182
    407407msgid "Custom"
    408408msgstr "カスタム"
    409409
    410 #: includes/form-properties.php:173
     410#: includes/form-properties.php:195
    411411msgid "Notification"
    412412msgstr "通知"
    413413
    414 #: includes/form-properties.php:174
     414#: includes/form-properties.php:194
    415415msgid "Do not specify the site administrator as CC / BCC."
    416416msgstr "サイト管理者をCC/BCCに指定しない。"
    417417
    418 #: includes/form-properties.php:175
     418#: includes/form-properties.php:197
    419419msgid "Designate the site administrator as CC."
    420420msgstr "サイト管理者をCCに指定する。"
     
    424424msgstr "サイト管理者をBCCに指定する。"
    425425
    426 #: includes/form-properties.php:103
     426#: includes/form-properties.php:125
    427427msgid "Login rebuilder"
    428428msgstr ""
    429429
    430 #: includes/form-properties.php:217 login-rebuilder.php:414
     430#: includes/form-properties.php:239 login-rebuilder.php:496
    431431msgid "Number of logs viewed on the login page"
    432432msgstr "ログインページのアクセスログ件数"
    433433
    434 #: login-rebuilder.php:2075
     434#: login-rebuilder.php:2280
    435435msgid "Log of login page request"
    436436msgstr "ログインページのアクセスログ"
    437437
    438 #: login-rebuilder.php:2087 login-rebuilder.php:2269
     438#: login-rebuilder.php:2292 login-rebuilder.php:2460
    439439msgid "Request datetime - Requesting IP - Method - User agent"
    440440msgstr "リクエスト日時 - リクエスト元IP - メソッド - ユーザーエージェント"
    441441
    442 #: includes/form-properties.php:223 includes/form-properties.php:236
    443 #: includes/form-properties.php:247 includes/form-properties.php:258
     442#: includes/form-properties.php:245 includes/form-properties.php:258
     443#: includes/form-properties.php:269 includes/form-properties.php:280
    444444msgid "Line break"
    445445msgstr "改行切替"
    446446
    447 #: includes/form-properties.php:215 includes/form-properties.php:228
    448 #: includes/form-properties.php:239 includes/form-properties.php:250
     447#: @:Description
    449448msgid "No logs."
    450449msgstr "ログはありません。"
    451450
    452 #: @:Description
     451#: includes/form-properties.php:185
    453452msgid "This plugin will create a new login page for your site. The new login page can be placed in any directory. You can also create separate login pages for administrators and for other users."
    454453msgstr "このプラグインは、あなたのサイトに新しいログインページを作成。新しいログインページは、任意のディレクトリに配置することができます。また、管理者用とその他のユーザー用のログインページを別々に作成できます。"
    455454
    456 #: includes/form-properties.php:163
     455#: includes/form-properties.php:188
    457456msgid "Notify the site administrator when the login page is requested from an IP address that has never logged in before."
    458457msgstr "ログイン履歴がないIPアドレスからログインページが要求された場合、サイト管理者に通知する。"
    459458
    460 #: includes/form-properties.php:166
     459#: includes/form-properties.php:186
    461460msgid "minutes"
    462461msgstr "分"
    463462
    464 #: includes/form-properties.php:167
     463#: includes/form-properties.php:189
    465464msgid "Waiting for the next notification:"
    466465msgstr "次の通知まで待ち時間:"
    467466
    468 #: login-rebuilder.php:2693
     467#: login-rebuilder.php:2941
    469468msgid "This notification is effective when your home or office has a static IP address."
    470469msgstr "この通知は自宅やオフィスなどが固定IPアドレスの場合に有効です。"
    471470
    472 #: login-rebuilder.php:2694
     471#: login-rebuilder.php:2942
    473472msgid "Logged in information:"
    474473msgstr ""
    475474
    476 #: login-rebuilder.php:2695
     475#: login-rebuilder.php:2943
    477476msgid "Site URL: %s"
    478477msgstr ""
    479478
    480 #: login-rebuilder.php:2696 login-rebuilder.php:2771
     479#: login-rebuilder.php:2944 login-rebuilder.php:3019
    481480msgid "User name: %s"
    482481msgstr ""
    483482
    484 #: login-rebuilder.php:2697 login-rebuilder.php:2769
     483#: login-rebuilder.php:2945 login-rebuilder.php:3017
    485484msgid "Date time: %s"
    486485msgstr ""
    487486
    488 #: login-rebuilder.php:2698 login-rebuilder.php:2772
     487#: login-rebuilder.php:2946 login-rebuilder.php:3020
    489488msgid "IP address: %s"
    490489msgstr ""
    491490
    492 #: login-rebuilder.php:2699
     491#: login-rebuilder.php:2947
    493492msgid "User agent: %s"
    494493msgstr ""
    495494
    496 #: login-rebuilder.php:2700
     495#: login-rebuilder.php:2948
    497496msgid "If you are not logged in, promptly take appropriate measures."
    498497msgstr ""
    499498
    500 #: login-rebuilder.php:2764
     499#: login-rebuilder.php:3012
    501500msgid "[%s] %s logged in."
    502501msgstr ""
    503502
    504 #: login-rebuilder.php:2770
     503#: login-rebuilder.php:3018
    505504msgid "IP address information:"
    506505msgstr ""
    507506
    508 #: login-rebuilder.php:2774
     507#: login-rebuilder.php:3022
    509508msgid "Count: %d"
    510509msgstr ""
    511510
    512 #: login-rebuilder.php:2778
     511#: login-rebuilder.php:3026
    513512msgid "In case of a suspicious IP address, please take appropriate measures immediately."
    514513msgstr ""
    515514
    516 #: login-rebuilder.php:3013
     515#: login-rebuilder.php:3292
    517516msgid "[%s] Unknown IP address."
    518517msgstr ""
    519518
    520 #: login-rebuilder.php:2316
     519#: login-rebuilder.php:2550
    521520msgid "This REST API has been disabled."
    522521msgstr ""
    523522
    524 #: login-rebuilder.php:2319
     523#: login-rebuilder.php:2553
    525524msgid "This account is also logged in elsewhere."
    526525msgstr "このアカウントは、他の場所でもログインしています。"
    527526
    528 #: login-rebuilder.php:401
     527#: login-rebuilder.php:483
    529528msgid "This account is logged in only at this location."
    530529msgstr "このアカウントは、この場所でのみログインしています。"
    531530
    532 #: login-rebuilder.php:524
     531#: login-rebuilder.php:611
    533532msgid "Logged-in users"
    534533msgstr "ログイン中のユーザー"
    535534
    536 #: login-rebuilder.php:508
     535#: includes/form-properties.php:211
    537536msgid "Logged in datetime - Username(Requesting IP)"
    538537msgstr "ログイン日時 - ユーザー名(リクエスト元IP)"
     
    542541msgstr "すべてのユーザーに「ログイン中のユーザー」ウィジェットを表示する。"
    543542
    544 #: login-rebuilder.php:813 login-rebuilder.php:813
     543#: includes/form-properties.php:63
     544msgid "Important: If this setting is enabled, HTTP Authentication will be applied to the login page."
     545msgstr "【重要】この設定をオンにすると、ログインページにHTTP認証が適用される。"
     546
     547#: includes/form-properties.php:78
     548msgid "Use HTTP Authentication"
     549msgstr "HTTP認証を使用"
     550
     551#: includes/form-properties.php:78
     552msgid "Password is not set."
     553msgstr "パスワードは未設定。"
     554
     555#: includes/form-properties.php:77
     556msgid "Password has been set."
     557msgstr "パスワードは設定済み。"
     558
     559#: includes/form-properties.php:69
     560msgid "If you change the user name, be sure to specify the password."
     561msgstr "ユーザー名を変更する場合は、必ずパスワードを指定してください。"
     562
     563#: includes/form-properties.php:79
     564msgid "In the case of a pop-up display, HTTP authentication is performed."
     565msgstr "ポップアップ表示の場合でもHTTP認証を行う。"
     566
     567#: login-rebuilder.php:986 login-rebuilder.php:986
    545568#~ msgid "Notify by e-mail when the administrator login."
    546569#~ msgstr "管理者がログインした際にメールで通知する。"
    547570
    548 #: login-rebuilder.php:819 login-rebuilder.php:819
     571#: login-rebuilder.php:959 login-rebuilder.php:959
    549572#, fuzzy
    550573#~ msgid "The error message when login, is changed to the ambiguous content."
  • login-rebuilder/trunk/login-rebuilder.php

    r3183470 r3240433  
    55Description: This plugin will create a new login page for your site. The new login page can be placed in any directory. You can also create separate login pages for administrators and for other users.
    66Author: tmatsuur
    7 Version: 2.8.6
     7Version: 2.8.7
    88Author URI: https://12net.jp/
    99Text Domain: login-rebuilder
     
    1212
    1313/*
    14  Copyright (C) 2013-2024 tmatsuur (Email: takenori dot matsuura at 12net dot jp)
     14 Copyright (C) 2013-2025 tmatsuur (Email: takenori dot matsuura at 12net dot jp)
    1515This program is licensed under the GNU GPL Version 2.
    1616*/
     
    2020define( 'LOGIN_REBUILDER_DOMAIN', 'login-rebuilder' );
    2121define( 'LOGIN_REBUILDER_DB_VERSION_NAME', 'login-rebuilder-db-version' );
    22 define( 'LOGIN_REBUILDER_DB_VERSION', '2.8.6' );
     22define( 'LOGIN_REBUILDER_DB_VERSION', '2.8.7' );
    2323define( 'LOGIN_REBUILDER_PROPERTIES', 'login-rebuilder' );
    2424define( 'LOGIN_REBUILDER_LOGGING_NAME', 'login-rebuilder-logging' );
     
    103103    private $arrow_slash_in_login_path = true;  // [2.6.2]
    104104    private $interim_login; // [2.9.0]
     105    private $password_reset_user = null; // [2.8.7]
    105106
    106107    /**
     
    112113     */
    113114    public function __construct() {
    114         register_activation_hook( __FILE__ , array( &$this , 'activation' ) );
    115         register_deactivation_hook( __FILE__ , array( &$this , 'deactivation' ) );
    116 
    117         if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {
    118             $remote_addr = $_SERVER['HTTP_CLIENT_IP'];
    119         } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
    120             $ip_array = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] );
    121             $remote_addr = $ip_array[0];
    122         } else {
    123             $remote_addr = isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : self::INVALID_REMOTE_ADDR;  // [2.8.6] $_SERVER['REMOTE_ADDR'] not exist.
    124         }
    125         $this->remote_addr = preg_match( '/^(([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3,5}([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/', $remote_addr )? $remote_addr: self::INVALID_REMOTE_ADDR;
    126         $this->request_uri = $this->_sanitize_url( $_SERVER['REQUEST_URI'] );
    127         $this->user_agent = isset( $_SERVER['HTTP_USER_AGENT'] )? wp_specialchars_decode( $_SERVER['HTTP_USER_AGENT'], ENT_QUOTES ): 'None';
    128 
    129         // [2.8.5][2.8.3][2.6.2] $_SERVER['SERVER_NAME'] was wrong.
    130         if ( isset( $_SERVER['HTTP_HOST'] ) ) {
    131             $this->host_name = $_SERVER['HTTP_HOST'];
    132         } elseif ( isset( $_SERVER['SERVER_NAME'] ) ) {
    133             $this->host_name = $_SERVER['SERVER_NAME'];
    134         } elseif ( isset( $_SERVER['SERVER_ADDR'] ) ) { // [2.8.6] $_SERVER['SERVER_ADDR'] exists.
    135             $this->host_name = gethostbyaddr( $_SERVER['SERVER_ADDR'] );
    136         } else { // [2.8.6] $_SERVER['SERVER_ADDR'] not exist.
    137             $this->host_name = parse_url( get_site_url(), PHP_URL_HOST );
    138         }
    139 
    140         $this->root_url = ( ( is_ssl() || force_ssl_admin() )? "https://": "http://" ) . $this->host_name;
    141         $this->root_path = $_SERVER['DOCUMENT_ROOT'];
    142         if ( empty( $this->root_path ) ) {
    143             list( $scheme, $content_uri ) = explode( "://" . $this->host_name, get_option( 'siteurl' ) );
    144             $this->root_path = preg_replace( '/'.str_replace( array( '-', '.', '/' ), array( '\\-', '\\.', '[\\/\\\\]' ), $content_uri ).'/u', '', untrailingslashit( ABSPATH ) );
    145         }
    146 
    147         $this->interim_login = isset( $GLOBALS['interim_login'] ) && $GLOBALS['interim_login'];
    148 
    149         if ( is_multisite() && ! is_main_site( get_current_blog_id() ) ) {
    150             // [2.4.4] bugfix: installed in subdirectory
    151             $this->use_site_option = false;
    152 
    153             if ( ! is_subdomain_install() ) {   // [2.6.2]
    154                 $this->arrow_slash_in_login_path = false;
    155             }
    156         }
    157 
    158         $this->_load_option();
    159         if ( $this->properties['status'] == self::LOGIN_REBUILDER_STATUS_WORKING &&
    160             ( !@file_exists( $this->_login_file_path( $this->properties['page'] ) ) || !$this->_is_valid_new_login_file() ) ) {
    161             $this->properties['status'] = self::LOGIN_REBUILDER_STATUS_IN_PREPARATION;
    162         }
    163 
    164         add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
    165         add_action( 'admin_init', array( &$this, 'admin_init' ) );
    166         add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts' ) );
    167 
    168         add_action( 'wp_ajax_login_rebuilder_try_save', array( &$this, 'try_save' ) );
    169         add_action( 'wp_ajax_login_rebuilder_lock_exists', array( &$this, 'lock_exists' ) );
    170         add_action( 'wp_ajax_login_rebuilder_download_log', array( &$this, 'download_log' ) );
    171         add_action( 'wp_ajax_' . self::AJAX_LOGGED_IN_USERS, array( &$this, 'logged_in_users' ) );
    172 
    173         add_filter( 'plugin_row_meta', array( &$this, 'plugin_row_meta' ), 9, 4 );  // [2.0.0] Changed to 4 from 2 the number of parameters.
    174         add_filter( 'site_url', array( &$this, 'site_url' ), 10, 4 );
    175         add_filter( 'network_site_url', array( &$this, 'network_site_url' ), 10, 3 );
    176         add_filter( 'wp_redirect', array( &$this, 'wp_redirect' ), 10, 2 );
    177 
    178         if ( $this->properties['status'] == self::LOGIN_REBUILDER_STATUS_WORKING ) {
    179             add_action( 'login_init', array( &$this, 'login_init' ) );
    180             if ( self::HTTP_AUTHENTICATE_ENABLED ) {
    181                 if ( $this->properties['use_http_auth'] &&
    182                     ! empty( $this->properties['http_auth_username'] ) &&
    183                     ! empty( $this->properties['http_auth_hash'] ) &&
    184                     ( ! $this->interim_login || $this->properties['http_auth_popup'] ) ) {  // [2.9.0]
    185                     add_action( 'login_init', array( &$this, 'http_auth_to_login' ), 1 );
    186                 }
    187             }
    188 
    189             add_action( 'set_logged_in_cookie', array( &$this, 'set_logged_in_cookie' ), 10, $this->_is_wp_version( '4.9', '>=' )? 6: 5 );  // [2.8.0] Changed this process from 'login_redirect' action to 'set_logged_in_cookie' action.
    190             if ( $this->properties['logging'] == self::LOGIN_REBUILDER_LOGGING_ALL ||
    191                 $this->properties['logging'] == self::LOGIN_REBUILDER_LOGGING_LOGIN ) {
    192                 add_action( 'wp_login_failed', array( &$this, 'wp_login_failed' ), 10, 1 );
    193             }
    194             add_filter( 'authenticate', array( &$this, 'role_authenticate' ), self::PRIORITY_ROLE_AUTHENTICATE, 3 );
    195             if ( isset( $this->properties['ambiguous_error_message'] ) && $this->properties['ambiguous_error_message'] ) {  // [2.1.0]
    196                 add_filter( 'authenticate', array( &$this, 'ambiguous_error_message' ), self::PRIORITY_AMBIGUOUS_ERROR_MESSAGE, 3 );
    197             }
    198             if ( isset( $this->properties['disable_authenticate_email_password'] ) && $this->properties['disable_authenticate_email_password'] &&
    199                 function_exists( 'wp_authenticate_email_password' ) )   { // [2.1.0]
    200                 remove_filter( 'authenticate', 'wp_authenticate_email_password', 20 );
    201             }
    202             if ( isset( $this->properties['access_author_page'] ) &&
    203                 $this->properties['access_author_page'] == self::LOGIN_REBUILDER_ACCESS_AUTHOR_PAGE_404 ) { // [2.4.0]
    204                 add_filter( 'redirect_canonical', array( &$this, 'author_page_canonical' ), 10, 2 );
    205                 add_action( 'template_redirect', array( &$this, 'author_page_404' ) );
    206                 add_filter( 'wp_sitemaps_add_provider', array( &$this, 'sitemaps_suppress_users' ), 10, 2 ); // [2.6.7]
    207             }
    208             if ( isset( $this->properties['oembed'] ) &&
    209                 $this->properties['oembed'] != self::LOGIN_REBUILDER_OEMBED_DEFAULT ) { // [2.4.1]
    210                 add_filter( 'oembed_response_data', array( &$this, 'oembed_hide_author_data' ), 10, 4 );    // hide author name and url
    211                 if ( $this->properties['oembed'] == self::LOGIN_REBUILDER_OEMBED_DONT_OUTPUT ) {
    212                     remove_action( 'wp_head', 'wp_oembed_add_discovery_links' );                            // Don't output links
    213                     add_filter( 'rest_pre_dispatch', array( &$this, 'disable_oembed_request' ), 10, 3 );    // disable oembed request
    214                 }
    215             }
    216             add_filter( 'user_request_action_email_content', array( &$this, 'set_original_confirmaction_url' ), 10, 2 );    // [2.4.2]
    217 
    218             if ( isset( $this->properties['locked_status_popup'] ) && $this->properties['locked_status_popup'] ) {  // [2.5.0]
    219                 add_filter( 'login_errors', array( &$this, 'login_locked_status' ), 10, 1 );
    220                 add_filter( 'login_messages', array( &$this, 'login_locked_status' ), 10, 1 );
    221             }
    222             add_filter( 'determine_locale', array( &$this, 'determined_locale' ), 10, 1 );  // [2.5.0]
    223 
    224             if ( isset( $this->properties['restrict_rest_users'] ) && $this->properties['restrict_rest_users'] ) {  // [2.6.0]
    225                 add_filter( 'rest_pre_dispatch', array( &$this, 'rest_pre_dispatch' ), 8, 3 );
    226             }
    227 
    228             if ( $this->_is_wp_version( '4.7.4', '>=' ) ) { // [2.6.2]
    229                 add_filter( 'send_auth_cookies', array( &$this, 'send_auth_cookies' ), 10000, 1 );
    230             }
    231 
    232             // [2.7.1]
    233         }
    234         if ( $this->_is_wp_version( '3.5', '>=' ) ) {
    235             $this->_xmlrpc_actions();
     115        if ( ! defined( 'LOGIN_REBUILDER_LOADED' ) ) {
     116            register_activation_hook( __FILE__ , array( &$this , 'activation' ) );
     117            register_deactivation_hook( __FILE__ , array( &$this , 'deactivation' ) );
     118
     119            if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {
     120                $remote_addr = $_SERVER['HTTP_CLIENT_IP'];
     121            } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
     122                $ip_array = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] );
     123                $remote_addr = $ip_array[0];
     124            } else {
     125                $remote_addr = isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : self::INVALID_REMOTE_ADDR;  // [2.8.6] $_SERVER['REMOTE_ADDR'] not exist.
     126            }
     127            $this->remote_addr = preg_match( '/^(([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3,5}([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/', $remote_addr )? $remote_addr: self::INVALID_REMOTE_ADDR;
     128            $this->request_uri = $this->_sanitize_url( $_SERVER['REQUEST_URI'] );
     129            $this->user_agent = isset( $_SERVER['HTTP_USER_AGENT'] )? wp_specialchars_decode( $_SERVER['HTTP_USER_AGENT'], ENT_QUOTES ): 'None';
     130
     131            // [2.8.5][2.8.3][2.6.2] $_SERVER['SERVER_NAME'] was wrong.
     132            if ( isset( $_SERVER['HTTP_HOST'] ) ) {
     133                $this->host_name = $_SERVER['HTTP_HOST'];
     134            } elseif ( isset( $_SERVER['SERVER_NAME'] ) ) {
     135                $this->host_name = $_SERVER['SERVER_NAME'];
     136            } elseif ( isset( $_SERVER['SERVER_ADDR'] ) ) { // [2.8.6] $_SERVER['SERVER_ADDR'] exists.
     137                $this->host_name = gethostbyaddr( $_SERVER['SERVER_ADDR'] );
     138            } else { // [2.8.6] $_SERVER['SERVER_ADDR'] not exist.
     139                $this->host_name = parse_url( get_site_url(), PHP_URL_HOST );
     140            }
     141
     142            $this->root_url = ( ( is_ssl() || force_ssl_admin() )? "https://": "http://" ) . $this->host_name;
     143            $this->root_path = $_SERVER['DOCUMENT_ROOT'];
     144            if ( empty( $this->root_path ) ) {
     145                list( $scheme, $content_uri ) = explode( "://" . $this->host_name, get_option( 'siteurl' ) );
     146                $this->root_path = preg_replace( '/'.str_replace( array( '-', '.', '/' ), array( '\\-', '\\.', '[\\/\\\\]' ), $content_uri ).'/u', '', untrailingslashit( ABSPATH ) );
     147            }
     148
     149            $this->interim_login = isset( $GLOBALS['interim_login'] ) && $GLOBALS['interim_login'];
     150
     151            if ( is_multisite() && ! is_main_site( get_current_blog_id() ) ) {
     152                // [2.4.4] bugfix: installed in subdirectory
     153                $this->use_site_option = false;
     154
     155                if ( ! is_subdomain_install() ) {   // [2.6.2]
     156                    $this->arrow_slash_in_login_path = false;
     157                }
     158            }
     159
     160            $this->_load_option();
     161            if ( $this->properties['status'] == self::LOGIN_REBUILDER_STATUS_WORKING &&
     162                ( !@file_exists( $this->_login_file_path( $this->properties['page'] ) ) || !$this->_is_valid_new_login_file() ) ) {
     163                $this->properties['status'] = self::LOGIN_REBUILDER_STATUS_IN_PREPARATION;
     164            }
     165
     166            add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
     167            add_action( 'admin_init', array( &$this, 'admin_init' ) );
     168            add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts' ) );
     169
     170            add_action( 'wp_ajax_login_rebuilder_try_save', array( &$this, 'try_save' ) );
     171            add_action( 'wp_ajax_login_rebuilder_lock_exists', array( &$this, 'lock_exists' ) );
     172            add_action( 'wp_ajax_login_rebuilder_download_log', array( &$this, 'download_log' ) );
     173            add_action( 'wp_ajax_' . self::AJAX_LOGGED_IN_USERS, array( &$this, 'logged_in_users' ) );
     174
     175            add_filter( 'plugin_row_meta', array( &$this, 'plugin_row_meta' ), 9, 4 );  // [2.0.0] Changed to 4 from 2 the number of parameters.
     176            add_filter( 'site_url', array( &$this, 'site_url' ), 10, 4 );
     177            add_filter( 'network_site_url', array( &$this, 'network_site_url' ), 10, 3 );
     178            add_filter( 'wp_redirect', array( &$this, 'wp_redirect' ), 10, 2 );
     179            add_action( 'allow_password_reset', array( $this, 'allow_password_reset' ), 1, 2 ); // [2.8.7]
     180            add_action( 'validate_password_reset', array( $this, 'validate_password_reset' ), 1, 2 );   // [2.8.7]
     181
     182            if ( $this->properties['status'] == self::LOGIN_REBUILDER_STATUS_WORKING ) {
     183                add_action( 'login_init', array( &$this, 'login_init' ) );
     184                if ( self::HTTP_AUTHENTICATE_ENABLED ) {
     185                    if ( $this->properties['use_http_auth'] &&
     186                        ! empty( $this->properties['http_auth_username'] ) &&
     187                        ! empty( $this->properties['http_auth_hash'] ) &&
     188                        ( ! $this->interim_login || $this->properties['http_auth_popup'] ) ) {  // [2.9.0]
     189                        add_action( 'login_init', array( &$this, 'http_auth_to_login' ), 1 );
     190                    }
     191                }
     192
     193                add_action( 'set_logged_in_cookie', array( &$this, 'set_logged_in_cookie' ), 10, $this->_is_wp_version( '4.9', '>=' )? 6: 5 );  // [2.8.0] Changed this process from 'login_redirect' action to 'set_logged_in_cookie' action.
     194                if ( $this->properties['logging'] == self::LOGIN_REBUILDER_LOGGING_ALL ||
     195                    $this->properties['logging'] == self::LOGIN_REBUILDER_LOGGING_LOGIN ) {
     196                    add_action( 'wp_login_failed', array( &$this, 'wp_login_failed' ), 10, 1 );
     197                }
     198                add_filter( 'authenticate', array( &$this, 'role_authenticate' ), self::PRIORITY_ROLE_AUTHENTICATE, 3 );
     199                if ( isset( $this->properties['ambiguous_error_message'] ) && $this->properties['ambiguous_error_message'] ) {  // [2.1.0]
     200                    add_filter( 'authenticate', array( &$this, 'ambiguous_error_message' ), self::PRIORITY_AMBIGUOUS_ERROR_MESSAGE, 3 );
     201                }
     202                if ( isset( $this->properties['disable_authenticate_email_password'] ) && $this->properties['disable_authenticate_email_password'] &&
     203                    function_exists( 'wp_authenticate_email_password' ) )   { // [2.1.0]
     204                    remove_filter( 'authenticate', 'wp_authenticate_email_password', 20 );
     205                }
     206                if ( isset( $this->properties['access_author_page'] ) &&
     207                    $this->properties['access_author_page'] == self::LOGIN_REBUILDER_ACCESS_AUTHOR_PAGE_404 ) { // [2.4.0]
     208                    add_filter( 'redirect_canonical', array( &$this, 'author_page_canonical' ), 10, 2 );
     209                    add_action( 'template_redirect', array( &$this, 'author_page_404' ) );
     210                    add_filter( 'wp_sitemaps_add_provider', array( &$this, 'sitemaps_suppress_users' ), 10, 2 ); // [2.6.7]
     211                }
     212                if ( isset( $this->properties['oembed'] ) &&
     213                    $this->properties['oembed'] != self::LOGIN_REBUILDER_OEMBED_DEFAULT ) { // [2.4.1]
     214                    add_filter( 'oembed_response_data', array( &$this, 'oembed_hide_author_data' ), 10, 4 );    // hide author name and url
     215                    if ( $this->properties['oembed'] == self::LOGIN_REBUILDER_OEMBED_DONT_OUTPUT ) {
     216                        remove_action( 'wp_head', 'wp_oembed_add_discovery_links' );                            // Don't output links
     217                        add_filter( 'rest_pre_dispatch', array( &$this, 'disable_oembed_request' ), 10, 3 );    // disable oembed request
     218                    }
     219                }
     220                add_filter( 'user_request_action_email_content', array( &$this, 'set_original_confirmaction_url' ), 10, 2 );    // [2.4.2]
     221
     222                if ( isset( $this->properties['locked_status_popup'] ) && $this->properties['locked_status_popup'] ) {  // [2.5.0]
     223                    add_filter( 'login_errors', array( &$this, 'login_locked_status' ), 10, 1 );
     224                    add_filter( 'login_messages', array( &$this, 'login_locked_status' ), 10, 1 );
     225                }
     226                add_filter( 'determine_locale', array( &$this, 'determined_locale' ), 10, 1 );  // [2.5.0]
     227
     228                if ( isset( $this->properties['restrict_rest_users'] ) && $this->properties['restrict_rest_users'] ) {  // [2.6.0]
     229                    add_filter( 'rest_pre_dispatch', array( &$this, 'rest_pre_dispatch' ), 8, 3 );
     230                }
     231
     232                if ( $this->_is_wp_version( '4.7.4', '>=' ) ) { // [2.6.2]
     233                    add_filter( 'send_auth_cookies', array( &$this, 'send_auth_cookies' ), 10000, 1 );
     234                }
     235
     236                // [2.7.1]
     237            }
     238            if ( $this->_is_wp_version( '3.5', '>=' ) ) {
     239                $this->_xmlrpc_actions();
     240            }
     241
     242            define( 'LOGIN_REBUILDER_LOADED', time() ); // [2.8.7]
    236243        }
    237244    }
     
    282289    public function login_init() {
    283290        if ( $this->_is_wp_version( '4.9.6', '>=' ) && isset( $_GET['action'] ) && $_GET['action'] == 'confirmaction' ) return;     // [2.4.2] User request confirm
    284         if ( isset( $_GET['action'] ) && $_GET['action'] == 'postpass' ) return;                // Password reset
     291        if ( isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'postpass', 'resetpass', 'rp' ) ) ) return;              // Password reset [2.8.7] Added 'resetpass' and 'rp'
    285292        if ( get_option( 'users_can_register' ) && !$this->properties['reject_user_register'] &&
    286293            ( ( isset( $_GET['action'] ) && $_GET['action'] == 'register' ) ||
     
    753760     */
    754761    public function site_url( $url, $path, $orig_scheme, $blog_id ) {
     762        if ( 'site_url' !== current_filter() ) {
     763            return $url;
     764        }
    755765        if ( $this->properties['status'] == self::LOGIN_REBUILDER_STATUS_WORKING ) {
    756766            $my_login_page = $this->properties['page'];
    757             if ( function_exists( 'wp_get_current_user' ) )
     767            if ( function_exists( 'wp_get_current_user' ) ) {
    758768                $user = wp_get_current_user();
    759             else
     769            } else {
    760770                $user = (object)array( 'data'=>null );
     771            }
    761772            if ( isset( $this->properties['page_subscriber'] ) && $this->properties['page_subscriber'] != '' &&
    762                 ( $this->_in_url( $this->request_uri, $this->properties['page_subscriber'] ) || ( isset( $user->data ) && $this->_is_secondary_login_user( $user ) ) ) )
     773                ( $this->_in_url( $this->request_uri, $this->properties['page_subscriber'] ) || ( isset( $user->data ) && $this->_is_secondary_login_user( $user ) ) ) ) {
    763774                $my_login_page = $this->properties['page_subscriber'];
    764 
    765             if ( $this->_is_login_path( $path ) &&
    766                 ( $this->_is_user_logged_in() || $this->_in_url( $this->request_uri, $my_login_page ) ) ) {
    767                 $url = $this->_rewrite_login_url( 'wp-login.php', $my_login_page, $url );
     775            }
     776
     777            if ( $this->_is_login_path( $path ) ) {
     778                if ( $this->_is_user_logged_in() || $this->_in_url( $this->request_uri, $my_login_page ) ) {
     779                    $url = $this->_rewrite_login_url( 'wp-login.php', $my_login_page, $url );
     780                } elseif ( $this->_is_requested_password_reset() && $this->password_reset_user ) {  // [2.8.7]
     781                    if ( ! isset( $this->properties['page_subscriber'] ) || empty( $this->properties['page_subscriber'] ) ||
     782                        $this->_is_not_secondary_login_user( $this->password_reset_user ) ) {
     783                        $url = $this->_rewrite_login_url( 'wp-login.php', $this->properties['page'], $url );
     784                    } elseif ( isset( $this->properties['page_subscriber'] ) && ! empty( $this->properties['page_subscriber'] ) &&
     785                        $this->_is_secondary_login_user( $this->password_reset_user ) ) {
     786                        $url = $this->_rewrite_login_url( 'wp-login.php', $this->properties['page_subscriber'], $url );
     787                    }
     788                }
    768789            }
    769790        }
    770791        return $url;
     792    }
     793
     794    /**
     795     * Check if the requested URL is a password reset.
     796     *
     797     * @since 2.8.7
     798     */
     799    private function _is_requested_password_reset() {
     800        return preg_match( '/\/wp\-login\.php/u', $this->request_uri ) &&
     801            ( did_action( 'login_form_rp' ) || did_action( 'login_form_resetpass' ) ) &&
     802            1 === did_filter( 'password_reset_expiration' );
     803    }
     804
     805    /**
     806     * Check whether the user corresponds to the URL for password reset.
     807     *
     808     * @since 2.8.7
     809     *
     810     * @see allow_password_reset filter.
     811     *
     812     * @param bool $allow   Whether to allow the password to be reset. Default true.
     813     * @param int  $user_id The ID of the user attempting to reset a password.
     814     * @return bool
     815     */
     816    public function allow_password_reset( $allow, $user_id ) {
     817        if ( 'allow_password_reset' === current_filter() && $allow && $user_id ) {
     818            $allow = false;
     819            $user = get_user_by( 'id', $user_id );
     820            if ( isset( $this->properties['page_subscriber'] ) &&
     821                ! empty( $this->properties['page_subscriber'] ) &&
     822                $this->_in_url( $this->request_uri, $this->properties['page_subscriber'] ) &&
     823                $this->_is_secondary_login_user( $user ) ) {
     824                $this->password_reset_user = $user;
     825                $allow = true;
     826            } elseif ( $this->_in_url( $this->request_uri, $this->properties['page'] ) &&
     827                $this->_is_not_secondary_login_user( $user ) ) {
     828                $this->password_reset_user = $user;
     829                $allow = true;
     830            }
     831        }
     832        return $allow;
     833    }
     834
     835    /**
     836     * Retain user with reset password.
     837     *
     838     * @since 2.8.7
     839     *
     840     * @see validate_password_reset action.
     841     *
     842     * @param WP_Error $errors
     843     * @param WP_User|WP_Error $user
     844     */
     845    public function validate_password_reset( $errors, $user ) {
     846        if ( 'validate_password_reset' === current_action() &&
     847            ! $errors->has_errors() &&
     848            isset( $_POST['pass1'] ) && ! empty( $_POST['pass1'] ) &&
     849            $user && ! is_wp_error( $user ) ) {
     850            $this->password_reset_user = $user;
     851        }
    771852    }
    772853
     
    33733454    public function disable_oembed_request( $response, $server, $request ) {
    33743455        if ( 0 === strpos( $request->get_route(), '/oembed/' ) ) {
    3375             return new WP_Error( 'oembed request has disabled', __( 'This REST API has been disabled.', LOGIN_REBUILDER_DOMAIN ) );
     3456            return new \WP_Error( 'oembed request has disabled', __( 'This REST API has been disabled.', LOGIN_REBUILDER_DOMAIN ) );
    33763457        }
    33773458        return $response;
     
    35403621                );
    35413622            }
    3542             return new WP_Error(
     3623            return new \WP_Error(
    35433624                'rest_forbidden',
    35443625                __( 'Sorry, you are not allowed to this requests.', LOGIN_REBUILDER_DOMAIN ),
  • login-rebuilder/trunk/readme.txt

    r3183470 r3240433  
    55Requires at least: 3.2.0
    66Requires PHP: 5.6
    7 Tested up to: 6.7.0
    8 Stable tag: 2.8.6
     7Tested up to: 6.7.2
     8Stable tag: 2.8.7
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9595== Changelog ==
    9696
     97= 2.8.7 =
     98* Bug fix: The issue has been fixed, and the password can now be reset.
     99
    97100= 2.8.6 =
    98101* Bug fix: Adjusted what is applied to internally stored hostnames when SERVER['SERVER_ADDR'] does not exist.
Note: See TracChangeset for help on using the changeset viewer.