Changeset 3240433
- Timestamp:
- 02/14/2025 06:08:10 AM (10 months ago)
- Location:
- login-rebuilder/trunk
- Files:
-
- 1 added
- 4 edited
-
languages/login-rebuilder-ja.l10n.php (added)
-
languages/login-rebuilder-ja.mo (modified) (previous)
-
languages/login-rebuilder-ja.po (modified) (10 diffs)
-
login-rebuilder.php (modified) (9 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
login-rebuilder/trunk/languages/login-rebuilder-ja.po
r2758890 r3240433 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "POT-Creation-Date: 2018-04-18 15:48+0900\n" 6 "PO-Revision-Date: 202 2-07-12 17:21:55+09:00\n"6 "PO-Revision-Date: 2023-03-28 10:59:08+09:00\n" 7 7 "Last-Translator: takenori matsuura <[email protected]>\n" 8 8 "Language-Team: \n" … … 14 14 "X-Poedit-Basepath: C:/Program Files (x86)/Apache Software Foundation/Apache2.4/htdocs\n" 15 15 "X-Poedit-SourceCharset: UTF-8\n" 16 "X-Generator: Poppoppoo/0.9. 0\n"16 "X-Generator: Poppoppoo/0.9.3\n" 17 17 "X-Poedit-SearchPath-0: wp-content/plugins/login-rebuilder\n" 18 18 … … 34 34 msgstr "無効なリクエスト時の応答 " 35 35 36 #: includes/form-properties.php:31 includes/form-properties.php:1 4236 #: includes/form-properties.php:31 includes/form-properties.php:164 37 37 msgid "403 status" 38 38 msgstr "403ステータス" … … 50 50 msgstr "ログインファイル キーワード" 51 51 52 #: includes/form-properties.php: 6252 #: includes/form-properties.php:84 53 53 msgid "New login file" 54 54 msgstr "新しいログインファイル" 55 55 56 #: includes/form-properties.php: 86includes/form-xmlrpc-properties.php:8456 #: includes/form-properties.php:108 includes/form-xmlrpc-properties.php:84 57 57 msgid "Secondary login file" 58 58 msgstr "第2ログインファイル" 59 59 60 #: includes/form-properties.php: 87includes/form-xmlrpc-properties.php:8560 #: includes/form-properties.php:109 includes/form-xmlrpc-properties.php:85 61 61 msgid "in preparation" 62 62 msgstr "準備中" 63 63 64 #: includes/form-properties.php: 9364 #: includes/form-properties.php:115 65 65 msgid "working" 66 66 msgstr "稼働中" 67 67 68 #: includes/form-properties.php: 9668 #: includes/form-properties.php:118 69 69 msgid "Logging" 70 70 msgstr "ログ保存" 71 71 72 #: includes/form-properties.php: 9772 #: includes/form-properties.php:117 73 73 msgid "off" 74 74 msgstr "しない" 75 75 76 #: includes/form-properties.php: 9876 #: includes/form-properties.php:119 77 77 msgid "invalid request only" 78 78 msgstr "無効なリクエスト時のみ " 79 79 80 #: includes/form-properties.php: 9980 #: includes/form-properties.php:121 81 81 msgid "login only" 82 82 msgstr "ログイン時のみ" 83 83 84 #: includes/form-properties.php:1 0284 #: includes/form-properties.php:124 85 85 msgid "all" 86 86 msgstr "すべて" 87 87 88 #: includes/form-properties.php:1 0488 #: includes/form-properties.php:126 89 89 msgid "Number of invalid logs" 90 90 msgstr "無効なリクエストのログ件数" 91 91 92 #: includes/form-properties.php:1 3892 #: includes/form-properties.php:160 93 93 msgid "Number of login logs" 94 94 msgstr "ログインのログ件数" 95 95 96 #: includes/form-properties.php:1 4196 #: includes/form-properties.php:163 97 97 msgid "Browsing to the Author page" 98 98 msgstr "著者ページの閲覧" 99 99 100 #: includes/form-properties.php:1 49100 #: includes/form-properties.php:171 101 101 msgid "accept" 102 102 msgstr "受け入れる" 103 103 104 #: includes/form-properties.php:1 52104 #: includes/form-properties.php:174 105 105 msgid "oEmbed" 106 106 msgstr "oEmbed" 107 107 108 #: includes/form-properties.php:1 53108 #: includes/form-properties.php:173 109 109 msgid "Default" 110 110 msgstr "標準" 111 111 112 #: includes/form-properties.php:1 54112 #: includes/form-properties.php:176 113 113 msgid "Hide the author name and url of the response data." 114 114 msgstr "レスポンスデータの投稿者名とURLを隠す。" 115 115 116 #: includes/form-properties.php: 181116 #: includes/form-properties.php:203 117 117 msgid "Don't output response data and links of head element." 118 118 msgstr "head要素内のリンクとレスポンスデータを出力しない。" 119 119 120 #: includes/form-properties.php: 184120 #: includes/form-properties.php:206 121 121 msgid "Other" 122 122 msgstr "その他" 123 123 124 #: includes/form-properties.php: 185124 #: includes/form-properties.php:205 125 125 msgid "Change the error message at login to ambiguous content." 126 126 msgstr "ログイン時のエラーメッセージをあいまいな内容に変更する。" 127 127 128 #: includes/form-properties.php: 186128 #: includes/form-properties.php:208 129 129 msgid "Authentication using a email address and a password is prohibited." 130 130 msgstr "メールアドレスとパスワードによる認証を禁止する。" 131 131 132 #: includes/form-properties.php: 188132 #: includes/form-properties.php:210 133 133 msgid "Reject the registration form." 134 134 msgstr "登録フォームを拒絶する。" 135 135 136 #: includes/form-properties.php:1 70136 #: includes/form-properties.php:192 137 137 msgid "Log file contains a heading line." 138 138 msgstr "ログファイルに見出しを付ける。" 139 139 140 #: includes/form-properties.php:1 63 includes/form-properties.php:170140 #: includes/form-properties.php:185 includes/form-properties.php:192 141 141 msgid "Notify by email when the administrator login." 142 142 msgstr "管理者のログインを通知する。" 143 143 144 #: includes/form-properties.php: 199144 #: includes/form-properties.php:221 145 145 msgid "Test" 146 146 msgstr "テスト" 147 147 148 #: includes/form-properties.php:2 41 login-rebuilder.php:409148 #: includes/form-properties.php:263 login-rebuilder.php:491 149 149 msgid "View log" 150 150 msgstr "ログを表示" 151 151 152 #: includes/form-properties.php:2 30 login-rebuilder.php:419152 #: includes/form-properties.php:252 login-rebuilder.php:501 153 153 msgid "Log of invalid request" 154 154 msgstr "無効なリクエスト時のログ" 155 155 156 #: includes/form-properties.php: 291156 #: includes/form-properties.php:327 157 157 msgid "Log of login" 158 158 msgstr "ログインのログ" 159 159 160 #: includes/form-properties.php:3 08 login-rebuilder.php:3093161 #: login-rebuilder.php:3 095160 #: includes/form-properties.php:344 login-rebuilder.php:3372 161 #: login-rebuilder.php:3374 162 162 msgid "The case of the sub-site, you can not contain '/' in the path name. Please change a path name." 163 163 msgstr "サブサイトでは、'/'を含んだパス名を指定できません。パス名を変更してください。" 164 164 165 #: includes/form-properties.php:3 10 login-rebuilder.php:3098165 #: includes/form-properties.php:346 login-rebuilder.php:3377 166 166 msgid "File exists, " 167 167 msgstr "ファイルあり, " 168 168 169 #: includes/form-properties.php:3 12169 #: includes/form-properties.php:348 170 170 msgid "File not found, " 171 171 msgstr "ファイルなし, " 172 172 173 #: includes/form-properties.php:3 15173 #: includes/form-properties.php:351 174 174 msgid "Writing is possible" 175 175 msgstr "書き込み可能" 176 176 177 #: includes/form-xmlrpc-properties.php:16 login-rebuilder.php: 816178 #: login-rebuilder.php: 816177 #: includes/form-xmlrpc-properties.php:16 login-rebuilder.php:989 178 #: login-rebuilder.php:989 179 179 msgid "Writing is impossible" 180 180 msgstr "書き込み不可" … … 221 221 msgstr "受け付けるピンバックを最大 %s 件 / %s 秒とする。" 222 222 223 #: includes/form-xmlrpc-properties.php:74 login-rebuilder.php:2 184223 #: includes/form-xmlrpc-properties.php:74 login-rebuilder.php:2375 224 224 #, php-format 225 225 msgid "If the number of received pingback has exceeded the limit it refuses to accept %s minutes." 226 226 msgstr "ピンバックが受付制限を超過した場合に受付を %s 分間拒絶する。" 227 227 228 #: includes/form-xmlrpc-properties.php:74 login-rebuilder.php:2 450228 #: includes/form-xmlrpc-properties.php:74 login-rebuilder.php:2698 229 229 #, php-format 230 230 msgid "It rejects the reception from %s" 231 231 msgstr "%s から受付を拒絶" 232 232 233 #: includes/form-xmlrpc-properties.php:75 login-rebuilder.php:2 186233 #: includes/form-xmlrpc-properties.php:75 login-rebuilder.php:2377 234 234 msgid "Acceptance resumes" 235 235 msgstr "受付を再開" 236 236 237 #: login-rebuilder.php: 425237 #: login-rebuilder.php:507 238 238 msgid "Accepting" 239 239 msgstr "受付中" 240 240 241 #: login-rebuilder.php: 844 login-rebuilder.php:847241 #: login-rebuilder.php:1017 login-rebuilder.php:1020 242 242 msgid "Log of pingback" 243 243 msgstr "ピンバックのログ" 244 244 245 #: login-rebuilder.php: 852245 #: login-rebuilder.php:1025 246 246 msgid "Please check your inbox for a confirmation email." 247 247 msgstr "確認メールをチェックしてください。" 248 248 249 #: login-rebuilder.php: 855249 #: login-rebuilder.php:1028 250 250 msgid "New login file is system file. Please change a path name." 251 251 msgstr "指定されたログインファイル名は予約されています。パス名を変更してください。" 252 252 253 #: login-rebuilder.php: 858253 #: login-rebuilder.php:1031 254 254 msgid "The case of the sub-site, new login file is invalid. Please change a path name." 255 255 msgstr "サブサイトでは指定されたログインファイル名は無効です。パス名を変更してください。" 256 256 257 #: login-rebuilder.php: 861257 #: login-rebuilder.php:1034 258 258 msgid "Login file for subscriber is invalid. Please change a path name." 259 259 msgstr "指定された購読者専用ログインファイル名は予約されています。パス名を変更してください。" 260 260 261 #: login-rebuilder.php: 864261 #: login-rebuilder.php:1037 262 262 msgid "The case of the sub-site, login file for subscriber is invalid. Please change a path name." 263 263 msgstr "サブサイトでは指定された購読者専用ログインファイル名は無効です。パス名を変更してください。" 264 264 265 #: login-rebuilder.php:1 029265 #: login-rebuilder.php:1223 266 266 msgid "User role to use the secondary login file is not selected. Please select at least one role." 267 267 msgstr "第2ログインファイルの権限グループが選択されていません。1つの以上の権限グループを選択してください。" 268 268 269 #: login-rebuilder.php:1 036 login-rebuilder.php:1045 login-rebuilder.php:1060270 #: login-rebuilder.php:2 456269 #: login-rebuilder.php:1230 login-rebuilder.php:1239 login-rebuilder.php:1254 270 #: login-rebuilder.php:2704 271 271 msgid "" 272 272 "However, failed to write a new login file to disk.\n" … … 276 276 "ディスクを書き込み可能に変更するか、手動でアップロードしてください。" 277 277 278 #: login-rebuilder.php:1 038278 #: login-rebuilder.php:1232 279 279 msgid "Options saved." 280 280 msgstr "設定を保存しました。" 281 281 282 #: login-rebuilder.php:1 051282 #: login-rebuilder.php:1245 283 283 msgid "" 284 284 "However, failed to write a login file for subscriber to disk.\n" … … 288 288 "ディスクを書き込み可能に変更するか、手動でアップロードしてください。" 289 289 290 #: login-rebuilder.php:1 055290 #: login-rebuilder.php:1249 291 291 msgid "However, a new login file was not found." 292 292 msgstr "ただし、新しいログインファイルが見つかりませんでした。" 293 293 294 #: login-rebuilder.php:1 080294 #: login-rebuilder.php:1274 295 295 msgid "However, the contents of a new login file are not in agreement." 296 296 msgstr "ただし、ログインファイルの内容がおかしい可能性があります。" 297 297 298 #: login-rebuilder.php:2 043 login-rebuilder.php:2134298 #: login-rebuilder.php:2248 login-rebuilder.php:2339 299 299 msgid "Expiration date of this page has expired." 300 300 msgstr "ページの有効期間が切れています。" 301 301 302 #: login-rebuilder.php:2 057 login-rebuilder.php:2209302 #: login-rebuilder.php:2262 login-rebuilder.php:2400 303 303 msgid "Request datetime - Username(Requesting IP)" 304 304 msgstr "リクエスト日時 - ユーザー名(リクエスト元IP)" 305 305 306 #: login-rebuilder.php:2 057306 #: login-rebuilder.php:2262 307 307 msgid "Notice" 308 308 msgstr "補足" 309 309 310 #: login-rebuilder.php:2 190310 #: login-rebuilder.php:2381 311 311 msgid "It will display the '(XMLRPC)' In the case of XML-RPC request." 312 312 msgstr "XML-RPCリクエスト時は'(XMLRPC)'が表示されます。" 313 313 314 #: login-rebuilder.php:2 189314 #: login-rebuilder.php:2390 login-rebuilder.php:2577 315 315 msgid "Request datetime - Requesting IP|Status|From Hostname|(Error)" 316 316 msgstr "リクエスト日時 - リクエスト元IP|状態|ピング元ホスト名|(エラー)" 317 317 318 #: login-rebuilder.php:2 209318 #: login-rebuilder.php:2400 319 319 msgid "(Unknown)" 320 320 msgstr "(不明)" 321 321 322 #: login-rebuilder.php:2 209322 #: login-rebuilder.php:2400 323 323 msgid "'A' is accept." 324 324 msgstr "'A'は受付です。" 325 325 326 #: login-rebuilder.php:2 431 login-rebuilder.php:2438 login-rebuilder.php:2445326 #: login-rebuilder.php:2679 login-rebuilder.php:2686 login-rebuilder.php:2693 327 327 msgid "'R' is refuse." 328 328 msgstr "'R'は拒否です。" 329 329 330 #: login-rebuilder.php:2 453330 #: login-rebuilder.php:2701 331 331 msgid "Please specify a value of 1 or more." 332 332 msgstr "1以上の値を指定してください。" … … 336 336 msgstr "ピンバックの受付を再開しました。" 337 337 338 #: includes/form-properties.php:5 1338 #: includes/form-properties.php:52 339 339 msgid "This plug-in will make a new login page for your site." 340 340 msgstr "このプラグインは新しいログインページを作ります。" 341 341 342 #: includes/form-properties.php:5 2342 #: includes/form-properties.php:53 343 343 msgid "Important: If you enable this setting, you can not login if the file specified below exists." 344 344 msgstr "【重要】この設定をオンにし、指定されたファイルが存在する場合はログインできません。" 345 345 346 #: login-rebuilder.php:3 093346 #: login-rebuilder.php:3372 347 347 msgid "Use lock file" 348 348 msgstr "ロックファイルを使用" 349 349 350 #: login-rebuilder.php:3 095 login-rebuilder.php:3098350 #: login-rebuilder.php:3374 login-rebuilder.php:3377 351 351 msgid "No login allowed" 352 352 msgstr "ログイン不可" 353 353 354 #: login-rebuilder.php:2 166354 #: login-rebuilder.php:2357 355 355 msgid "Login possible" 356 356 msgstr "ログイン可" 357 357 358 #: includes/form-properties.php:5 6358 #: includes/form-properties.php:57 359 359 msgid "Lock file" 360 360 msgstr "ロックファイル" 361 361 362 #: login-rebuilder.php:3 117362 #: login-rebuilder.php:3395 363 363 msgid "Show locked status on pop-up re-login form." 364 364 msgstr "ポップアップされた再ログインフォームにロック状態を表示する。" 365 365 366 #: includes/form-properties.php: 187366 #: includes/form-properties.php:209 367 367 msgid "Authentication is locked, please login after unlocking." 368 368 msgstr "認証ロック中: ロックを解除してからログインしてください。" 369 369 370 #: includes/form-properties.php:2 52 login-rebuilder.php:431370 #: includes/form-properties.php:274 login-rebuilder.php:513 371 371 msgid "Deny the REST API / Users if not logged in." 372 372 msgstr "ログインしていない場合はREST API / Usersを拒否する。" 373 373 374 #: login-rebuilder.php:2 254374 #: login-rebuilder.php:2445 375 375 msgid "Log of denied REST API" 376 376 msgstr "拒否したREST APIのログ" 377 377 378 #: login-rebuilder.php:3 183378 #: login-rebuilder.php:3461 379 379 msgid "Request datetime - Requesting IP | URI" 380 380 msgstr "リクエスト日時 - リクエスト元IP | URI " 381 381 382 #: includes/form-properties.php:1 05382 #: includes/form-properties.php:125 383 383 msgid "Sorry, you are not allowed to this requests." 384 384 msgstr "Sorry, you are not allowed to this requests." 385 385 386 #: includes/form-properties.php:1 06386 #: includes/form-properties.php:128 387 387 msgid "Number of pingback logs" 388 388 msgstr "Pingbackのログ件数" 389 389 390 #: includes/form-properties.php:1 12 includes/form-properties.php:114390 #: includes/form-properties.php:134 includes/form-properties.php:136 391 391 msgid "Number of deny rest api logs" 392 392 msgstr "拒否したREST APIのログ件数" 393 393 394 #: includes/form-properties.php:1 21394 #: includes/form-properties.php:143 395 395 msgid "Format for displaying date and time of log" 396 396 msgstr "ログの日時の表示書式" 397 397 398 #: includes/form-properties.php:1 44398 #: includes/form-properties.php:166 399 399 msgid "Use site settings" 400 400 msgstr "サイト設定を利用" 401 401 402 #: includes/form-properties.php:1 32402 #: includes/form-properties.php:154 403 403 msgid "If you restrict browsing to the Author page, no \"users\" sitemap is created. (WordPress 5.5. 0 or later)" 404 404 msgstr "著者ページの閲覧を制限すると、usersサイトマップは作成されません。(WordPress 5.5.0以降)" 405 405 406 #: includes/form-properties.php:1 60406 #: includes/form-properties.php:182 407 407 msgid "Custom" 408 408 msgstr "カスタム" 409 409 410 #: includes/form-properties.php:1 73410 #: includes/form-properties.php:195 411 411 msgid "Notification" 412 412 msgstr "通知" 413 413 414 #: includes/form-properties.php:1 74414 #: includes/form-properties.php:194 415 415 msgid "Do not specify the site administrator as CC / BCC." 416 416 msgstr "サイト管理者をCC/BCCに指定しない。" 417 417 418 #: includes/form-properties.php:1 75418 #: includes/form-properties.php:197 419 419 msgid "Designate the site administrator as CC." 420 420 msgstr "サイト管理者をCCに指定する。" … … 424 424 msgstr "サイト管理者をBCCに指定する。" 425 425 426 #: includes/form-properties.php:1 03426 #: includes/form-properties.php:125 427 427 msgid "Login rebuilder" 428 428 msgstr "" 429 429 430 #: includes/form-properties.php:2 17 login-rebuilder.php:414430 #: includes/form-properties.php:239 login-rebuilder.php:496 431 431 msgid "Number of logs viewed on the login page" 432 432 msgstr "ログインページのアクセスログ件数" 433 433 434 #: login-rebuilder.php:2 075434 #: login-rebuilder.php:2280 435 435 msgid "Log of login page request" 436 436 msgstr "ログインページのアクセスログ" 437 437 438 #: login-rebuilder.php:2 087 login-rebuilder.php:2269438 #: login-rebuilder.php:2292 login-rebuilder.php:2460 439 439 msgid "Request datetime - Requesting IP - Method - User agent" 440 440 msgstr "リクエスト日時 - リクエスト元IP - メソッド - ユーザーエージェント" 441 441 442 #: includes/form-properties.php:2 23 includes/form-properties.php:236443 #: includes/form-properties.php:2 47 includes/form-properties.php:258442 #: includes/form-properties.php:245 includes/form-properties.php:258 443 #: includes/form-properties.php:269 includes/form-properties.php:280 444 444 msgid "Line break" 445 445 msgstr "改行切替" 446 446 447 #: includes/form-properties.php:215 includes/form-properties.php:228 448 #: includes/form-properties.php:239 includes/form-properties.php:250 447 #: @:Description 449 448 msgid "No logs." 450 449 msgstr "ログはありません。" 451 450 452 #: @:Description451 #: includes/form-properties.php:185 453 452 msgid "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." 454 453 msgstr "このプラグインは、あなたのサイトに新しいログインページを作成。新しいログインページは、任意のディレクトリに配置することができます。また、管理者用とその他のユーザー用のログインページを別々に作成できます。" 455 454 456 #: includes/form-properties.php:1 63455 #: includes/form-properties.php:188 457 456 msgid "Notify the site administrator when the login page is requested from an IP address that has never logged in before." 458 457 msgstr "ログイン履歴がないIPアドレスからログインページが要求された場合、サイト管理者に通知する。" 459 458 460 #: includes/form-properties.php:1 66459 #: includes/form-properties.php:186 461 460 msgid "minutes" 462 461 msgstr "分" 463 462 464 #: includes/form-properties.php:1 67463 #: includes/form-properties.php:189 465 464 msgid "Waiting for the next notification:" 466 465 msgstr "次の通知まで待ち時間:" 467 466 468 #: login-rebuilder.php:2 693467 #: login-rebuilder.php:2941 469 468 msgid "This notification is effective when your home or office has a static IP address." 470 469 msgstr "この通知は自宅やオフィスなどが固定IPアドレスの場合に有効です。" 471 470 472 #: login-rebuilder.php:2 694471 #: login-rebuilder.php:2942 473 472 msgid "Logged in information:" 474 473 msgstr "" 475 474 476 #: login-rebuilder.php:2 695475 #: login-rebuilder.php:2943 477 476 msgid "Site URL: %s" 478 477 msgstr "" 479 478 480 #: login-rebuilder.php:2 696 login-rebuilder.php:2771479 #: login-rebuilder.php:2944 login-rebuilder.php:3019 481 480 msgid "User name: %s" 482 481 msgstr "" 483 482 484 #: login-rebuilder.php:2 697 login-rebuilder.php:2769483 #: login-rebuilder.php:2945 login-rebuilder.php:3017 485 484 msgid "Date time: %s" 486 485 msgstr "" 487 486 488 #: login-rebuilder.php:2 698 login-rebuilder.php:2772487 #: login-rebuilder.php:2946 login-rebuilder.php:3020 489 488 msgid "IP address: %s" 490 489 msgstr "" 491 490 492 #: login-rebuilder.php:2 699491 #: login-rebuilder.php:2947 493 492 msgid "User agent: %s" 494 493 msgstr "" 495 494 496 #: login-rebuilder.php:2 700495 #: login-rebuilder.php:2948 497 496 msgid "If you are not logged in, promptly take appropriate measures." 498 497 msgstr "" 499 498 500 #: login-rebuilder.php: 2764499 #: login-rebuilder.php:3012 501 500 msgid "[%s] %s logged in." 502 501 msgstr "" 503 502 504 #: login-rebuilder.php: 2770503 #: login-rebuilder.php:3018 505 504 msgid "IP address information:" 506 505 msgstr "" 507 506 508 #: login-rebuilder.php: 2774507 #: login-rebuilder.php:3022 509 508 msgid "Count: %d" 510 509 msgstr "" 511 510 512 #: login-rebuilder.php: 2778511 #: login-rebuilder.php:3026 513 512 msgid "In case of a suspicious IP address, please take appropriate measures immediately." 514 513 msgstr "" 515 514 516 #: login-rebuilder.php:3 013515 #: login-rebuilder.php:3292 517 516 msgid "[%s] Unknown IP address." 518 517 msgstr "" 519 518 520 #: login-rebuilder.php:2 316519 #: login-rebuilder.php:2550 521 520 msgid "This REST API has been disabled." 522 521 msgstr "" 523 522 524 #: login-rebuilder.php:2 319523 #: login-rebuilder.php:2553 525 524 msgid "This account is also logged in elsewhere." 526 525 msgstr "このアカウントは、他の場所でもログインしています。" 527 526 528 #: login-rebuilder.php:4 01527 #: login-rebuilder.php:483 529 528 msgid "This account is logged in only at this location." 530 529 msgstr "このアカウントは、この場所でのみログインしています。" 531 530 532 #: login-rebuilder.php: 524531 #: login-rebuilder.php:611 533 532 msgid "Logged-in users" 534 533 msgstr "ログイン中のユーザー" 535 534 536 #: login-rebuilder.php:508535 #: includes/form-properties.php:211 537 536 msgid "Logged in datetime - Username(Requesting IP)" 538 537 msgstr "ログイン日時 - ユーザー名(リクエスト元IP)" … … 542 541 msgstr "すべてのユーザーに「ログイン中のユーザー」ウィジェットを表示する。" 543 542 544 #: login-rebuilder.php:813 login-rebuilder.php:813 543 #: includes/form-properties.php:63 544 msgid "Important: If this setting is enabled, HTTP Authentication will be applied to the login page." 545 msgstr "【重要】この設定をオンにすると、ログインページにHTTP認証が適用される。" 546 547 #: includes/form-properties.php:78 548 msgid "Use HTTP Authentication" 549 msgstr "HTTP認証を使用" 550 551 #: includes/form-properties.php:78 552 msgid "Password is not set." 553 msgstr "パスワードは未設定。" 554 555 #: includes/form-properties.php:77 556 msgid "Password has been set." 557 msgstr "パスワードは設定済み。" 558 559 #: includes/form-properties.php:69 560 msgid "If you change the user name, be sure to specify the password." 561 msgstr "ユーザー名を変更する場合は、必ずパスワードを指定してください。" 562 563 #: includes/form-properties.php:79 564 msgid "In the case of a pop-up display, HTTP authentication is performed." 565 msgstr "ポップアップ表示の場合でもHTTP認証を行う。" 566 567 #: login-rebuilder.php:986 login-rebuilder.php:986 545 568 #~ msgid "Notify by e-mail when the administrator login." 546 569 #~ msgstr "管理者がログインした際にメールで通知する。" 547 570 548 #: login-rebuilder.php: 819 login-rebuilder.php:819571 #: login-rebuilder.php:959 login-rebuilder.php:959 549 572 #, fuzzy 550 573 #~ msgid "The error message when login, is changed to the ambiguous content." -
login-rebuilder/trunk/login-rebuilder.php
r3183470 r3240433 5 5 Description: 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. 6 6 Author: tmatsuur 7 Version: 2.8. 67 Version: 2.8.7 8 8 Author URI: https://12net.jp/ 9 9 Text Domain: login-rebuilder … … 12 12 13 13 /* 14 Copyright (C) 2013-202 4tmatsuur (Email: takenori dot matsuura at 12net dot jp)14 Copyright (C) 2013-2025 tmatsuur (Email: takenori dot matsuura at 12net dot jp) 15 15 This program is licensed under the GNU GPL Version 2. 16 16 */ … … 20 20 define( 'LOGIN_REBUILDER_DOMAIN', 'login-rebuilder' ); 21 21 define( 'LOGIN_REBUILDER_DB_VERSION_NAME', 'login-rebuilder-db-version' ); 22 define( 'LOGIN_REBUILDER_DB_VERSION', '2.8. 6' );22 define( 'LOGIN_REBUILDER_DB_VERSION', '2.8.7' ); 23 23 define( 'LOGIN_REBUILDER_PROPERTIES', 'login-rebuilder' ); 24 24 define( 'LOGIN_REBUILDER_LOGGING_NAME', 'login-rebuilder-logging' ); … … 103 103 private $arrow_slash_in_login_path = true; // [2.6.2] 104 104 private $interim_login; // [2.9.0] 105 private $password_reset_user = null; // [2.8.7] 105 106 106 107 /** … … 112 113 */ 113 114 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] 236 243 } 237 244 } … … 282 289 public function login_init() { 283 290 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 reset291 if ( isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'postpass', 'resetpass', 'rp' ) ) ) return; // Password reset [2.8.7] Added 'resetpass' and 'rp' 285 292 if ( get_option( 'users_can_register' ) && !$this->properties['reject_user_register'] && 286 293 ( ( isset( $_GET['action'] ) && $_GET['action'] == 'register' ) || … … 753 760 */ 754 761 public function site_url( $url, $path, $orig_scheme, $blog_id ) { 762 if ( 'site_url' !== current_filter() ) { 763 return $url; 764 } 755 765 if ( $this->properties['status'] == self::LOGIN_REBUILDER_STATUS_WORKING ) { 756 766 $my_login_page = $this->properties['page']; 757 if ( function_exists( 'wp_get_current_user' ) ) 767 if ( function_exists( 'wp_get_current_user' ) ) { 758 768 $user = wp_get_current_user(); 759 else769 } else { 760 770 $user = (object)array( 'data'=>null ); 771 } 761 772 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 ) ) ) ) { 763 774 $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 } 768 789 } 769 790 } 770 791 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 } 771 852 } 772 853 … … 3373 3454 public function disable_oembed_request( $response, $server, $request ) { 3374 3455 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 ) ); 3376 3457 } 3377 3458 return $response; … … 3540 3621 ); 3541 3622 } 3542 return new WP_Error(3623 return new \WP_Error( 3543 3624 'rest_forbidden', 3544 3625 __( 'Sorry, you are not allowed to this requests.', LOGIN_REBUILDER_DOMAIN ), -
login-rebuilder/trunk/readme.txt
r3183470 r3240433 5 5 Requires at least: 3.2.0 6 6 Requires PHP: 5.6 7 Tested up to: 6.7. 08 Stable tag: 2.8. 67 Tested up to: 6.7.2 8 Stable tag: 2.8.7 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 95 95 == Changelog == 96 96 97 = 2.8.7 = 98 * Bug fix: The issue has been fixed, and the password can now be reset. 99 97 100 = 2.8.6 = 98 101 * 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.