Translate information-security-with-helmet#4
Translate information-security-with-helmet#4huluoyang merged 5 commits intoFreeCodeCampChina:translatefrom
Conversation
S1ngS1ng
left a comment
There was a problem hiding this comment.
先谢谢你的翻译,请看一下我的 comments。
另外,如果你后续还打算继续添加翻译,本地继续弄,弄好了之后 commit,然后直接 push 到你 fork 里的这个 branch 就可以了。为什么要现在 merge?
| "description": [ | ||
| "As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-infosec/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-infosec/'>GitHub</a>.", | ||
| "Hackers can exploit known vulnerabilities in Express/Node if they see that your site is powered by Express. X-Powered-By: Express is sent in every request coming from Express by default. The helmet.hidePoweredBy() middleware will remove the X-Powered-By header. You can also explicitly set the header to something else, to throw people off. e.g. app.use(helmet.hidePoweredBy({ setTo: 'PHP 4.2.0' }))" | ||
| "温馨提醒,这个项目是建立在下面这个模版之上的 <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-infosec/'>Glitch模版地址</a>, 你也可以从 <a href='https://github.com/freeCodeCamp/boilerplate-infosec/'>GitHub</a> 上克隆。", |
There was a problem hiding this comment.
这样读起来就很不通顺了对吧?建议:
注意,本项目在 <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-infosec/'>这个 Glitch 项目</a> 的基础上进行开发。
或者,注意,本项目以 <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-infosec/'>这个 Glitch 项目</a> 为基础。
个人比较 prefer 第一种。
| "As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-infosec/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-infosec/'>GitHub</a>.", | ||
| "Hackers can exploit known vulnerabilities in Express/Node if they see that your site is powered by Express. X-Powered-By: Express is sent in every request coming from Express by default. The helmet.hidePoweredBy() middleware will remove the X-Powered-By header. You can also explicitly set the header to something else, to throw people off. e.g. app.use(helmet.hidePoweredBy({ setTo: 'PHP 4.2.0' }))" | ||
| "温馨提醒,这个项目是建立在下面这个模版之上的 <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-infosec/'>Glitch模版地址</a>, 你也可以从 <a href='https://github.com/freeCodeCamp/boilerplate-infosec/'>GitHub</a> 上克隆。", | ||
| "黑客们可能会利用 Express/Node 的安全问题对你的网站做破坏如果他们知道你的网站是用 Express 搭建的. X-Powered-By: Express 默认情况下会被添加到所有响应的头部。不过 helmet.hidePoweredBy() 中间件可以帮你移除 X-Powered-By 头. 你甚至可以把头设置成其它的值。 如 app.use(helmet.hidePoweredBy({ setTo: 'PHP 4.2.0' }))" |
There was a problem hiding this comment.
翻译时,请注意调整语序,中英文的语序习惯是不同的。
另外,注意统一全角标点!
建议:如果黑客发现你的网站是用 Express 搭建的,那么他们就可以利用 Express 或 Node 现存的漏洞来攻击你的网站。
@huluoyang @wudifeixue 这里,虽然原文没有,但我觉得给 X-Powered-By: Express,helmet.hidePoweredBy() 以及后面的 app.use 都加上 <code></code> 比较好。你们认为呢?
There was a problem hiding this comment.
我觉得建议很不错,这个章节就是突出安全性的,所以隐藏 PoweredBy 是很有必要的。
There was a problem hiding this comment.
所以隐藏 PoweredBy 是很有必要的。
不会隐藏这个,加 <code></code> 的意思是改变显示的格式。
上面是没加 <code></code> 的效果,下面的是加了的
There was a problem hiding this comment.
了解了,谢谢两位,后续会注意。
|
|
|
@huluoyang 我的问题不是为什么会显示 merge 😂 我是问为什么要现在合并。 我明白任务分解的必要性。但我个人的理解是,分批的前提是不同的人 work on 不同的 part。对于一个人在同一个 task 上的 work,我比较建议提交的时候 但你说的 contribution 确实是 make sense 的。那就这么弄吧。 顺便,我们需不需要新建一个 label,让大家可以标记 “Ready to review” 的 PR? |
|
完成前三小节翻译并修正之前的错误。 |
|
@stanleyyylau 请更新,fix 一下 conflicts |
|
求救,我不知道在这里怎么处理冲突。我之前只处理过本地合并的冲突,在 Pull Request 里面的冲突还是没处理过。我在网上找了些资料。 但是我的 Upstream 是我 Clone 的 Repo,所以我 git pull origin translate 的时候没有显示有冲突。 |
|
我已在微信单独联系你。 |
|
Conflicting files |
|
感谢,又学会一招。I believe it's ready to be merged now. |
S1ngS1ng
left a comment
There was a problem hiding this comment.
看下 comments。改好之后就可以 merge 了
个人建议:
function 翻译成“函数”,method 翻译成“方法”。
其中,“方法”是绑定在对象上的函数。
@huluoyang 如果你觉得合适,可以添加到 wiki
| "As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-infosec/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-infosec/'>GitHub</a>.", | ||
| "Hackers can exploit known vulnerabilities in Express/Node if they see that your site is powered by Express. X-Powered-By: Express is sent in every request coming from Express by default. The helmet.hidePoweredBy() middleware will remove the X-Powered-By header. You can also explicitly set the header to something else, to throw people off. e.g. app.use(helmet.hidePoweredBy({ setTo: 'PHP 4.2.0' }))" | ||
| "温馨提醒,本项目在 <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-infosec/'>这个 Glitch 项目</a> 的基础上进行开发。你也可以从 <a href='https://github.com/freeCodeCamp/boilerplate-infosec/'>GitHub</a> 上克隆。", | ||
| "如果黑客发现你的网站是用 Express 搭建的,那么他们就可以利用 Express 或 Node 现存的漏洞来攻击你的网站。<code>X-Powered-By: Express</code> 默认情况下会被添加到所有响应的头部。不过 helmet.hidePoweredBy() 中间件可以帮你移除 X-Powered-By 头. 你甚至可以把头设置成其它的值。 如 <code>app.use(helmet.hidePoweredBy({ setTo: 'PHP 4.2.0' }))</code>" |
There was a problem hiding this comment.
移除 X-Powered-By 头. 标点!
设置成其它的值。 如 去掉句号之后的空格。
| "Your page could be put in a <frame> or <iframe> without your consent. This can result in clickjacking attacks, among other things. Clickjacking is a technique of tricking a user into interacting with a page different from what the user thinks it is. This can be obtained executing your page in a malicious context, by mean of iframing. In that context a hacker can put a hidden layer over your page. Hidden buttons can be used to run bad scripts. This middleware sets the X-Frame-Options header. It restricts who can put your site in a frame. It has three modes: DENY, SAMEORIGIN, and ALLOW-FROM.", | ||
| "We don’t need our app to be framed. You should use helmet.frameguard() passing with the configuration object {action: 'deny'}." | ||
| "温馨提醒,本项目在 <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-infosec/'>这个 Glitch 项目</a> 的基础上进行开发。你也可以从 <a href='https://github.com/freeCodeCamp/boilerplate-infosec/'>GitHub</a> 上克隆。", | ||
| "你的页面有可能会在未经你允许的情况下被放在 <frame> 或者 <iframe> 标签里面。其中一个风险就会导致 clickjacking 攻击。Clickjacking 这个小技巧可以在用户与网站 A 进行交互的时候,欺骗用户让用户以为他是在与网站 B 进行交互。通过 iframing 就可以恶意地执行你的页面。这种情况下,黑客可以在你的页面上再加一层隐藏的层。隐藏的按钮可以用来执行恶意的脚本。helmet 这个中间件可以设置 X-Frame-Options 这个头部。这样就能限制谁可以通过 iframe 引入你的页面了。 有三个模式可供配置: DENY, SAMEORIGIN, 和 ALLOW-FROM.", |
There was a problem hiding this comment.
你的页面有可能会在未经你允许的情况下被放在 <frame> 或者 <iframe> 标签里面。其中一个风险就会导致 clickjacking 攻击。 =>
黑客可能会不经过你的允许,把你的页面嵌套在 <frame> 或者 <iframe> 标签里,用以实现“点击劫持”。
clickjacking 有翻译的,参考:https://zh.wikipedia.org/wiki/%E7%82%B9%E5%87%BB%E5%8A%AB%E6%8C%81
Clickjacking 这个小技巧可以在用户与网站 A 进行交互的时候,欺骗用户让用户以为他是在与网站 B 进行交互。 =>
点击劫持是一种视觉上的欺骗手段,让用户误以为自己在与所看到的网页交互。
这个叫“技巧”不合适吧。。 😂
通过 iframing 就可以恶意地执行你的页面。这种情况下,黑客可以在你的页面上再加一层隐藏的层。隐藏的按钮可以用来执行恶意的脚本。 =>
通过 iframe,黑客可以在你的页面上添加一个透明的“层”,然后把自己的恶意代码放在一个用户看不到的按钮中。这样一来,你的网站的执行环境就被黑客设置成了他想要的效果。
- “执行页面” 显然说不通
- 不存在
iframing这种技术,原文那样写是出于语法考虑 - 我觉得
隐藏可以换成看不见的,因为这里强调的是用户看不到,而不是客观的“隐藏”
helmet 这个中间件可以设置 X-Frame-Options 这个头部。 去掉“这个”
There was a problem hiding this comment.
You have my respect.
| "We don’t need our app to be framed. You should use helmet.frameguard() passing with the configuration object {action: 'deny'}." | ||
| "温馨提醒,本项目在 <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-infosec/'>这个 Glitch 项目</a> 的基础上进行开发。你也可以从 <a href='https://github.com/freeCodeCamp/boilerplate-infosec/'>GitHub</a> 上克隆。", | ||
| "你的页面有可能会在未经你允许的情况下被放在 <frame> 或者 <iframe> 标签里面。其中一个风险就会导致 clickjacking 攻击。Clickjacking 这个小技巧可以在用户与网站 A 进行交互的时候,欺骗用户让用户以为他是在与网站 B 进行交互。通过 iframing 就可以恶意地执行你的页面。这种情况下,黑客可以在你的页面上再加一层隐藏的层。隐藏的按钮可以用来执行恶意的脚本。helmet 这个中间件可以设置 X-Frame-Options 这个头部。这样就能限制谁可以通过 iframe 引入你的页面了。 有三个模式可供配置: DENY, SAMEORIGIN, 和 ALLOW-FROM.", | ||
| "我们不需要我们的应用被 iframe 引用。只需要 helmet.frameguard() 这个函数,然后传入配置对象 {action: 'deny'} 就可以了。" |
There was a problem hiding this comment.
我们不需要我们的应用被 iframe 引用。 =>
我们的应用不需要被 iframe 引用。
只需要 helmet.frameguard() 这个函数, =>
你可以调用 <code>helmet.frameguard()</code> 这个方法,
{action: 'deny'} 也建议用 <code> 包起来
| }, | ||
| { | ||
| "text": "helmet.frameguard() 'action' should be set to 'DENY'", | ||
| "text": "helmet.frameguard() 'action' 应该被设置成 'DENY'", |
There was a problem hiding this comment.
helmet.frameguard() 'action' 应该被设置成 'DENY' =>
<code>helmet.frameguard()</code> 中的 <code>action</code> 属性的值应该为 'DENY'
| "description": [ | ||
| "As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-infosec/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-infosec/'>GitHub</a>.", | ||
| "温馨提醒,本项目在 <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-infosec/'>这个 Glitch 项目</a> 的基础上进行开发。你也可以从 <a href='https://github.com/freeCodeCamp/boilerplate-infosec/'>GitHub</a> 上克隆。", | ||
| "Cross-site scripting (XSS) is a frequent type of attack where malicious scripts are injected into vulnerable pages, with the purpose of stealing sensitive data like session cookies, or passwords.", |
There was a problem hiding this comment.
这些剩下的部分重新开 PR 吧。现在的这个 PR 就先翻译到这儿,你觉得如何?
There was a problem hiding this comment.
嗯,可以。剩下的我翻译完再继续提 RP
There was a problem hiding this comment.
我可能理解错你的意思了。你是指现在这个 PR 先合并,然后我继续翻译。把 helmetjs.json 全部翻译完了,然后另外再提 PR。是这个意思吗?我没太理解 “先把这个 PR 里的更新了吧” 具体是指?
There was a problem hiding this comment.
@S1ngS1ng Never mind, I just saw your reviews. Will update and let you know. @huluoyang Thanks for your edit, It reads much better now.
There was a problem hiding this comment.
@stanleyyylau 先按 comment 更新当前的翻译(如果你觉得有必要改的话,不过标点是真的要改)。
然后你可以本地创建个新的 branch 继续弄后续的翻译,后续的翻译开个新的 PR
There was a problem hiding this comment.
了解,标点和你提的建议都改了。thanks again
|
🎉 恭喜霆霆成功完成第一个PR,Mission is impossible! |
* 完成helmet第一小节翻译 * Finish 10% * Remove IDE generated files * Update according to comments
* 完成helmet第一小节翻译 * Finish 10% * Remove IDE generated files * Update according to comments
* 完成helmet第一小节翻译 * Finish 10% * Remove IDE generated files * Update according to comments



翻译章节
《信息安全和质量保证——Helmet》
变更文件
information-security-with-helmet.json
information-security-with-helmet.md
翻译进度
20%
0%