{
  "sha": "3ef38b9ea49e8493acc7766963f6d8d7f9c9f6c3",
  "node_id": "C_kwDOKDyQLdoAKDNlZjM4YjllYTQ5ZTg0OTNhY2M3NzY2OTYzZjZkOGQ3ZjljOWY2YzM",
  "commit": {
    "author": {
      "name": "gunzi-666",
      "email": "kinghao113@gmail.com",
      "date": "2026-05-22T10:31:13Z"
    },
    "committer": {
      "name": "GitHub",
      "email": "noreply@github.com",
      "date": "2026-05-22T10:31:13Z"
    },
    "message": "emmm 具体复现就不描述了  xiao佬自己看 (#361)",
    "tree": {
      "sha": "ef56417ba7042dd6e792d2916147b5073579c840",
      "url": "https://api.github.com/repos/wyx2685/v2board/git/trees/ef56417ba7042dd6e792d2916147b5073579c840"
    },
    "url": "https://api.github.com/repos/wyx2685/v2board/git/commits/3ef38b9ea49e8493acc7766963f6d8d7f9c9f6c3",
    "comment_count": 0,
    "verification": {
      "verified": true,
      "reason": "valid",
      "signature": "-----BEGIN PGP SIGNATURE-----\n\nwsFcBAABCAAQBQJqEDBxCRC1aQ7uu5UhlAAALdcQAEeqFfrJNdYScBkVFg+A20tK\nACKzHtYyT6l5YHhg9DF1VQGuFzTFbN69BqJWFrs0vcJ5Pj4LYSc9Kf49WZtI5mrd\nr+mFip0BMwybBqvKGOkqNgJ8UN4W6TRqRy+1IKnUWHV4+2pXIvJLKzCzbVeBlf/q\nni5IlxwO5FuFbK4VRU8jF+2tY9jWjMC2enEnp1g/veJIW/TTR0FWV0AXAamszIM1\n0sRp6fhiEdcQ7K7uuBbFAiXH37WqvozAouba2O/MiSkn0RYl5Wet4q5+is72eaKK\nN66+uL7fa0uxq5wX8Ab4dm5JIkUCeDZ7+B8AzPkuPv6svUj6LydOpkKicdVSDP0R\nxKq3bfXpJ6J4lUrQN2SINISmiGAfKaMAiMJJ8QTMuOwkcCXBFrsDFTwK17BVJd9q\n75+HVgzcNhTIsLIVXKpWKBkz2lbVpRg5P20O6H/V/9f+jPhrhn9mnj8ZvzE+8KvY\nIiljICAvlNTpenJ834+Da79gLVoojIgVhD4YcCJPyg3712eVeWj0i1EYDkPvTYqV\nXHr1M8KsWL6RkpLK9WeN0U7gmjS8fiKeDlHwfCoKktIxXkHo9ioPYSiaHYrRTeVd\npo5K6EMgXhinVYTYw6w8TiyGsLJkhZfvXq14xvclNlIVELnX/WsP3t90hulPFjEB\ntjodPDkHxHqlFFDiMuMJ\n=MGsg\n-----END PGP SIGNATURE-----\n",
      "payload": "tree ef56417ba7042dd6e792d2916147b5073579c840\nparent 13c7faa5ee138404ec526bf1313e885dfe705e04\nauthor gunzi-666 <kinghao113@gmail.com> 1779445873 +0800\ncommitter GitHub <noreply@github.com> 1779445873 +0800\n\nemmm 具体复现就不描述了  xiao佬自己看 (#361)",
      "verified_at": "2026-05-22T10:31:14Z"
    }
  },
  "url": "https://api.github.com/repos/wyx2685/v2board/commits/3ef38b9ea49e8493acc7766963f6d8d7f9c9f6c3",
  "html_url": "https://github.com/wyx2685/v2board/commit/3ef38b9ea49e8493acc7766963f6d8d7f9c9f6c3",
  "comments_url": "https://api.github.com/repos/wyx2685/v2board/commits/3ef38b9ea49e8493acc7766963f6d8d7f9c9f6c3/comments",
  "author": {
    "login": "gunzi-666",
    "id": 190101158,
    "node_id": "U_kgDOC1S2pg",
    "avatar_url": "https://avatars.githubusercontent.com/u/190101158?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/gunzi-666",
    "html_url": "https://github.com/gunzi-666",
    "followers_url": "https://api.github.com/users/gunzi-666/followers",
    "following_url": "https://api.github.com/users/gunzi-666/following{/other_user}",
    "gists_url": "https://api.github.com/users/gunzi-666/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/gunzi-666/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/gunzi-666/subscriptions",
    "organizations_url": "https://api.github.com/users/gunzi-666/orgs",
    "repos_url": "https://api.github.com/users/gunzi-666/repos",
    "events_url": "https://api.github.com/users/gunzi-666/events{/privacy}",
    "received_events_url": "https://api.github.com/users/gunzi-666/received_events",
    "type": "User",
    "user_view_type": "public",
    "site_admin": false
  },
  "committer": {
    "login": "web-flow",
    "id": 19864447,
    "node_id": "MDQ6VXNlcjE5ODY0NDQ3",
    "avatar_url": "https://avatars.githubusercontent.com/u/19864447?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/web-flow",
    "html_url": "https://github.com/web-flow",
    "followers_url": "https://api.github.com/users/web-flow/followers",
    "following_url": "https://api.github.com/users/web-flow/following{/other_user}",
    "gists_url": "https://api.github.com/users/web-flow/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/web-flow/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/web-flow/subscriptions",
    "organizations_url": "https://api.github.com/users/web-flow/orgs",
    "repos_url": "https://api.github.com/users/web-flow/repos",
    "events_url": "https://api.github.com/users/web-flow/events{/privacy}",
    "received_events_url": "https://api.github.com/users/web-flow/received_events",
    "type": "User",
    "user_view_type": "public",
    "site_admin": false
  },
  "parents": [
    {
      "sha": "13c7faa5ee138404ec526bf1313e885dfe705e04",
      "url": "https://api.github.com/repos/wyx2685/v2board/commits/13c7faa5ee138404ec526bf1313e885dfe705e04",
      "html_url": "https://github.com/wyx2685/v2board/commit/13c7faa5ee138404ec526bf1313e885dfe705e04"
    }
  ],
  "stats": {
    "total": 49,
    "additions": 31,
    "deletions": 18
  },
  "files": [
    {
      "sha": "f580609978450eaeae56177ea06dce1eb3007548",
      "filename": "app/Http/Controllers/V1/Passport/AuthController.php",
      "status": "modified",
      "additions": 28,
      "deletions": 15,
      "changes": 43,
      "blob_url": "https://github.com/wyx2685/v2board/blob/3ef38b9ea49e8493acc7766963f6d8d7f9c9f6c3/app%2FHttp%2FControllers%2FV1%2FPassport%2FAuthController.php",
      "raw_url": "https://github.com/wyx2685/v2board/raw/3ef38b9ea49e8493acc7766963f6d8d7f9c9f6c3/app%2FHttp%2FControllers%2FV1%2FPassport%2FAuthController.php",
      "contents_url": "https://api.github.com/repos/wyx2685/v2board/contents/app%2FHttp%2FControllers%2FV1%2FPassport%2FAuthController.php?ref=3ef38b9ea49e8493acc7766963f6d8d7f9c9f6c3",
      "patch": "@@ -234,28 +234,41 @@ public function getQuickLoginUrl(Request $request)\n \n     public function forget(AuthForget $request)\n     {\n-        $forgetRequestLimitKey = CacheKey::get('FORGET_REQUEST_LIMIT', $request->input('email'));\n-        $forgetRequestLimit = (int)Cache::get($forgetRequestLimitKey);\n-        if ($forgetRequestLimit >= 3) abort(500, __('Reset failed, Please try again later'));\n-        if ((string)Cache::get(CacheKey::get('EMAIL_VERIFY_CODE', $request->input('email'))) !== (string)$request->input('email_code')) {\n-            Cache::put($forgetRequestLimitKey, $forgetRequestLimit ? $forgetRequestLimit + 1 : 1, 300);\n+        $email     = strtolower(trim((string)$request->input('email')));\n+        $inputCode = (string)$request->input('email_code');\n+        $password  = (string)$request->input('password');\n+\n+        if (!preg_match('/^\\d{6}$/', $inputCode)) {\n             abort(500, __('Incorrect email verification code'));\n         }\n-        $user = User::where('email', $request->input('email'))->first();\n+\n+        $forgetRequestLimitKey = CacheKey::get('FORGET_REQUEST_LIMIT', $email);\n+        $forgetRequestLimit    = (int)Cache::get($forgetRequestLimitKey);\n+        if ($forgetRequestLimit >= 3) {\n+            abort(500, __('Reset failed, Please try again later'));\n+        }\n+\n+        $cachedCode = Cache::get(CacheKey::get('EMAIL_VERIFY_CODE', $email));\n+        if ($cachedCode === null || $cachedCode === '' || !hash_equals((string)$cachedCode, $inputCode)) {\n+            Cache::put($forgetRequestLimitKey, $forgetRequestLimit + 1, 300);\n+            abort(500, __('Incorrect email verification code'));\n+        }\n+\n+        $user = User::where('email', $email)->first();\n         if (!$user) {\n             abort(500, __('This email is not registered in the system'));\n         }\n-        $user->password = password_hash($request->input('password'), PASSWORD_DEFAULT);\n-        $user->password_algo = NULL;\n-        $user->password_salt = NULL;\n+\n+        $user->password      = password_hash($password, PASSWORD_DEFAULT);\n+        $user->password_algo = null;\n+        $user->password_salt = null;\n         if (!$user->save()) {\n             abort(500, __('Reset failed'));\n         }\n-        Cache::forget(CacheKey::get('EMAIL_VERIFY_CODE', $request->input('email')));\n-        $authService = new AuthService($user);\n-        $authService->removeAllSession();\n-        return response([\n-            'data' => true\n-        ]);\n+\n+        Cache::forget(CacheKey::get('EMAIL_VERIFY_CODE', $email));\n+        (new AuthService($user))->removeAllSession();\n+\n+        return response(['data' => true]);\n     }\n }"
    },
    {
      "sha": "3e032853a941b8039dc77759fd7bbdb519287020",
      "filename": "app/Http/Requests/Passport/AuthForget.php",
      "status": "modified",
      "additions": 3,
      "deletions": 3,
      "changes": 6,
      "blob_url": "https://github.com/wyx2685/v2board/blob/3ef38b9ea49e8493acc7766963f6d8d7f9c9f6c3/app%2FHttp%2FRequests%2FPassport%2FAuthForget.php",
      "raw_url": "https://github.com/wyx2685/v2board/raw/3ef38b9ea49e8493acc7766963f6d8d7f9c9f6c3/app%2FHttp%2FRequests%2FPassport%2FAuthForget.php",
      "contents_url": "https://api.github.com/repos/wyx2685/v2board/contents/app%2FHttp%2FRequests%2FPassport%2FAuthForget.php?ref=3ef38b9ea49e8493acc7766963f6d8d7f9c9f6c3",
      "patch": "@@ -14,9 +14,9 @@ class AuthForget extends FormRequest\n     public function rules()\n     {\n         return [\n-            'email' => 'required|email:strict',\n-            'password' => 'required|min:8',\n-            'email_code' => 'required'\n+            'email'      => 'required|string|email:strict|max:64',\n+            'password'   => 'required|string|min:8|max:64',\n+            'email_code' => 'required|string|digits:6',\n         ];\n     }\n "
    }
  ]
}
