Skip to content

Commit

Permalink
fix: formatting & wording
Browse files Browse the repository at this point in the history
  • Loading branch information
kylinbin committed Jun 6, 2022
1 parent 36e8c5d commit 146a06e
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions docs/locales/zh_CN/LC_MESSAGES/security.po
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ msgid ""
"vector, be sure to always quote your attributes with either double or single "
"quotes when using Jinja expressions in them:"
msgstr ""
"另外值得注意的是不使用引号的属性。 虽然 Jinja2 可以通过转义 HTML 避免 XSS 问题,"
"另外值得注意的是未经引号包裹的属性。虽然 Jinja2 可以通过转义 HTML 避免 XSS 问题,"
"但无法避免通过属性注入的 XSS。为了对付这种可能存在的攻击手段,在属性中使用 "
"Jinja 表达式时,请保证属性值始终被包括在双引号或单引号内:"

Expand Down Expand Up @@ -123,7 +123,7 @@ msgid ""
"against. The ``a`` tag's ``href`` attribute can contain a `javascript:` URI, "
"which the browser will execute when clicked if not secured properly."
msgstr ""
"有一类 XSS 问题, Jinja 的转义并不能防止。``a`` 标签的 ``href`` 属性可以包含一"
"有一类 XSS 问题,Jinja 的转义并不能防止。``a`` 标签的 ``href`` 属性可以包含一"
"个 `javascript:` URI,如果没有正确保护,在点击时浏览器就会执行。"

#: ../../security.rst:67
Expand Down Expand Up @@ -153,7 +153,7 @@ msgid ""
"engineering to do stupid things without them knowing."
msgstr ""
"如果你的认证信息存储在 cookie 中,你就有了隐式状态管理。“登录”的状态是由一个 "
"cookie 控制的,对每个页面的请求都会发送这个 cookie。不幸的是,由第三方网站引发的"
"cookie 控制的,对每个页面的请求都会发送这个 cookie。不幸的是,由第三方网站发起的"
"请求也遵循同样的机制。如果你不牢记这一点,有人可能会用社交工程欺骗应用程序的用"
"户,让他们在不知情的情况下做一些愚蠢的事情。"

Expand All @@ -177,7 +177,7 @@ msgid ""
"page, their profiles would get deleted while they are looking at images of "
"fluffy cats."
msgstr ""
"想象一下有数百万的并发用户的 Facebook ,有人发出小猫咪图片的链接。 当用户访问该"
"想象一下有数百万并发用户的 Facebook,有人发出小猫咪图片的链接。 当用户访问该"
"页面看着毛茸茸的猫片时,他们的资料就被删除了。"

#: ../../security.rst:95
Expand All @@ -188,7 +188,7 @@ msgid ""
"the server again, you would then have to compare the two tokens and ensure they "
"are equal."
msgstr ""
"如何防止这种情况呢?基本上你可以这样做:每一个修改服务器内容的请求,必须使用一个"
"如何防止这种情况呢?基本思路是:每一个修改服务器内容的请求,必须使用一个"
"一次性令牌,并将其存储在 cookie 中,传输表单数据时带上它。服务器再次接收到数据"
"后,必须比较两个令牌,确保它们是相等的。"

Expand Down Expand Up @@ -220,8 +220,8 @@ msgid ""
"issues/248#issuecomment-59934857>`_, so this behavior was changed and :func:"
"`~flask.jsonify` now supports serializing arrays."
msgstr ""
"ECMAScript 5 关闭了这个漏洞,所以所以只有非常老的浏览器仍然容易受到攻击,以及存"
" `其他更严重的漏洞 <https://github.com/pallets/flask/"
"ECMAScript 5 关闭了这个漏洞,所以只有非常老的浏览器仍然容易受到攻击,这些"
"浏览器还存在 `其他更严重的漏洞 <https://github.com/pallets/flask/"
"issues/248#issuecomment-59934857>`_,因而这个行为被改变了, :func:`~flask."
"jsonify` 现在支持序列化数组。"

Expand All @@ -237,11 +237,11 @@ msgid ""
"headers for you."
msgstr ""
"为了控制安全性,浏览器识别各种响应头部。我们建议你在应用程序中检查以下每种头"
"部, `Flask-Talisman`_ 扩展可用于管理 HTTPS 和安全头部。"
"部,`Flask-Talisman`_ 扩展可用于管理 HTTPS 和安全头部。"

#: ../../security.rst:130
msgid "HTTP Strict Transport Security (HSTS)"
msgstr "HTTP严格传输安全 (HSTS)"
msgstr "HTTP严格传输安全HSTS"

#: ../../security.rst:132
msgid ""
Expand All @@ -259,7 +259,7 @@ msgstr ""

#: ../../security.rst:142
msgid "Content Security Policy (CSP)"
msgstr "内容安全策略 (CSP)"
msgstr "内容安全策略CSP"

#: ../../security.rst:144
msgid ""
Expand Down Expand Up @@ -347,8 +347,8 @@ msgid ""
"security. Flask has configuration options to set these on the session cookie. "
"They can be set on other cookies too."
msgstr ""
"下面这些选项可以添加到 ``Set-Cookie`` 头部中以提高安全性。Flask 配置选项可以将这"
"些选项设置在会话 cookie 或者其他 cookie 上。"
"下面这些选项可以添加到 ``Set-Cookie`` 头部中以提高安全性。Flask 有配置选项可以将这"
"些设置在会话 cookie 或者其他 cookie 上。"

#: ../../security.rst:197
msgid "``Secure`` limits cookies to HTTPS traffic only."
Expand All @@ -367,7 +367,7 @@ msgid ""
"form. ``Strict`` prevents sending cookies with all external requests, including "
"following regular links."
msgstr ""
"``SameSite`` 限制 cookies 与外部网站的请求一起发送。可设置为 ``’Lax’`` (推荐)"
"``SameSite`` 限制 cookies 与外部网站的请求一起发送。可设置为 ``’Lax’``(推荐)"
"或 ``’Strict’``。``Lax`` 防止外部网站有 CSRF 请求倾向时(例如提交表单)发送 "
"cookies。``Strict`` 禁止所有外部请求发送 cookie,包括常规链接。"

Expand All @@ -389,7 +389,7 @@ msgid ""
"replay attacks, where intercepted cookies can be sent at a later time. ::"
msgstr ""
"对于会话 cookie,如果设置了 :attr:`session.permanent <flask.session."
"permanent>` ,那么就用 :data:`PERMANENT_SESSION_LIFETIME` 设置到期时间,Flask 的"
"permanent>`,那么就用 :data:`PERMANENT_SESSION_LIFETIME` 设置到期时间,Flask 的"
"默认 cookie 实现会验证加密签名不超过这个值,降低此值有助于减少重复攻击,防止 "
"cookie 被拦截后还可以在一段时间内有效发送的漏洞。 ::"

Expand Down

0 comments on commit 146a06e

Please sign in to comment.