- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for Errorf (0.2 sec)
-
docs/zh/docs/advanced/security/http-basic-auth.md
这段代码确保 `credentials.username` 是 `"stanleyjobson"`,且 `credentials.password` 是`"swordfish"`。与以下代码类似: ```Python if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"): # Return some error ... ``` 但使用 `secrets.compare_digest()`,可以防御**时差攻击**,更加安全。 ### 时差攻击 什么是**时差攻击**? 假设攻击者试图猜出用户名与密码。 他们发送用户名为 `johndoe`,密码为 `love123` 的请求。 然后,Python 代码执行如下操作: ```Python
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 22:43:48 GMT 2024 - 3.9K bytes - Viewed (0) -
docs/de/docs/advanced/security/http-basic-auth.md
Bei HTTP Basic Auth erwartet die Anwendung einen Header, der einen Benutzernamen und ein Passwort enthält. Wenn sie diesen nicht empfängt, gibt sie den HTTP-Error 401 „Unauthorized“ zurück. Und gibt einen Header `WWW-Authenticate` mit dem Wert `Basic` und einem optionalen `realm`-Parameter („Bereich“) zurück.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:28:08 GMT 2024 - 6.9K bytes - Viewed (0) -
docs/en/docs/advanced/security/http-basic-auth.md
For the simplest cases, you can use HTTP Basic Auth. In HTTP Basic Auth, the application expects a header that contains a username and a password. If it doesn't receive it, it returns an HTTP 401 "Unauthorized" error. And returns a header `WWW-Authenticate` with a value of `Basic`, and an optional `realm` parameter. That tells the browser to show the integrated prompt for a username and password.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 14:33:05 GMT 2024 - 5.9K bytes - Viewed (0) -
docs/em/docs/advanced/security/http-basic-auth.md
```Python hl_lines="1 11-21" {!../../../docs_src/security/tutorial007.py!} ``` 👉 🔜 🎏: ```Python if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"): # Return some error ... ``` ✋️ ⚙️ `secrets.compare_digest()` ⚫️ 🔜 🔐 🛡 🆎 👊 🤙 "🕰 👊". ### ⏲ 👊 ✋️ ⚫️❔ "⏲ 👊"❓ ➡️ 🌈 👊 🔄 💭 🆔 & 🔐. & 👫 📨 📨 ⏮️ 🆔 `johndoe` & 🔐 `love123`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 4.1K bytes - Viewed (0)