<i id='HE6kf'><tr id='HE6kf'><dt id='HE6kf'><q id='HE6kf'><span id='HE6kf'><b id='HE6kf'><form id='HE6kf'><ins id='HE6kf'></ins><ul id='HE6kf'></ul><sub id='HE6kf'></sub></form><legend id='HE6kf'></legend><bdo id='HE6kf'><pre id='HE6kf'><center id='HE6kf'></center></pre></bdo></b><th id='HE6kf'></th></span></q></dt></tr></i><div id='HE6kf'><tfoot id='HE6kf'></tfoot><dl id='HE6kf'><fieldset id='HE6kf'></fieldset></dl></div>

  • <legend id='HE6kf'><style id='HE6kf'><dir id='HE6kf'><q id='HE6kf'></q></dir></style></legend>
  • <small id='HE6kf'></small><noframes id='HE6kf'>

    <tfoot id='HE6kf'></tfoot>

          <bdo id='HE6kf'></bdo><ul id='HE6kf'></ul>
      1. Yii2 用户名密码加密

        Yii2 Username and password encryption(Yii2 用户名密码加密)

            <i id='P6Xls'><tr id='P6Xls'><dt id='P6Xls'><q id='P6Xls'><span id='P6Xls'><b id='P6Xls'><form id='P6Xls'><ins id='P6Xls'></ins><ul id='P6Xls'></ul><sub id='P6Xls'></sub></form><legend id='P6Xls'></legend><bdo id='P6Xls'><pre id='P6Xls'><center id='P6Xls'></center></pre></bdo></b><th id='P6Xls'></th></span></q></dt></tr></i><div id='P6Xls'><tfoot id='P6Xls'></tfoot><dl id='P6Xls'><fieldset id='P6Xls'></fieldset></dl></div>
            <tfoot id='P6Xls'></tfoot>

                <bdo id='P6Xls'></bdo><ul id='P6Xls'></ul>
                  <tbody id='P6Xls'></tbody>

              • <legend id='P6Xls'><style id='P6Xls'><dir id='P6Xls'><q id='P6Xls'></q></dir></style></legend>

                1. <small id='P6Xls'></small><noframes id='P6Xls'>

                  本文介绍了Yii2 用户名密码加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  几天前我扫描了我的 yii2 应用程序,并注意到登录表单中的用户名和密码是在没有任何加密的情况下发布的.我怎样才能让我的用户名和密码更安全?我知道 yiihelpersSecurity::encrypt($data, $secretKey) 会加密数据,我们也可以解密.但是如何在像登录表单这样的视图中使用它?

                  这是我的登录表单

                    'login-form']);?><?= $form->field($model, 'username') ?><?= $form->field($model, 'password')->passwordInput() ?><div class="form-group"><?= Html::submitButton('登录', ['class' => 'btn btn-info']) ?>

                  <?php ActiveForm::end();?>

                  这里如何处理用户输入数据的加密?

                  解决方案

                  正如 Sisko78 在其评论中声称的那样,客户端的散列密码在安全性方面没有太大帮助,但可以做到很多危害(如果有人在他们的浏览器中完全使用 Javascript,他们通常会被搞砸,因为您的服务器将无法正确处理未散列的数据).

                  我在这个问题上问了非常相似的问题,并得到了这个很好的答案.一般来说:

                  <块引用>

                  从攻击者的角度来看,无论您发送纯文本密码还是 MD5 哈希,都没有太大区别 (...)

                  这个答案包括对 MD5 哈希的引用,因为我是专门针对这个问题询问的.但是,它与 MD5 现在被视为非常不安全的事实没有任何关系.就您的(我的)问题而言,使用任何类型的客户端密码都与根本不散列密码一样不安全.而且唯一真正安全的选择是使用 HTTPS 协议.阿门.

                  I had scanned my yii2 application few days before and noted that username and passwords from the login form is posting without any encryption. How can i make my username and password more secure?I know yiihelpersSecurity::encrypt($data, $secretKey) will encrypt the data and similiary we can decrypt it. But how to use it in a view like login form?

                  This is my login form

                      <?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
                      <?= $form->field($model, 'username') ?>
                      <?= $form->field($model, 'password')->passwordInput() ?>
                      <div class="form-group">
                      <?= Html::submitButton('Login', ['class' => 'btn btn-info']) ?>
                      </div>
                      <?php ActiveForm::end(); ?>
                  

                  How to handle the encryption of user entered data here?

                  解决方案

                  As Sisko78 claims in its comment, hashing password on client side won't do much help in terms of security, but can do a lot of harm (if someone turns of Javascript at all in their browser, they're generally screwed, as your server won't be able to correctly process not hashed data).

                  I have asked very similar question on this matter and was given this great answer. In general:

                  From the attacker's standpoint, whether you send a plain text password or a MD5 hash or it doesn't make much difference (...)

                  This answer includes reference to MD5 hash, because I asked specifically for this one. But, it does not have any relation to the fact, that MD5 is now treated as very insecure. In terms of your (mine) question, using any kind of client-side password hasing is as insecure as not hashing password at all. And the only really secure option is to use HTTPS protocol. Amen.

                  这篇关于Yii2 用户名密码加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                  <small id='EaLEg'></small><noframes id='EaLEg'>

                  1. <tfoot id='EaLEg'></tfoot>

                      <legend id='EaLEg'><style id='EaLEg'><dir id='EaLEg'><q id='EaLEg'></q></dir></style></legend>
                        <bdo id='EaLEg'></bdo><ul id='EaLEg'></ul>

                        • <i id='EaLEg'><tr id='EaLEg'><dt id='EaLEg'><q id='EaLEg'><span id='EaLEg'><b id='EaLEg'><form id='EaLEg'><ins id='EaLEg'></ins><ul id='EaLEg'></ul><sub id='EaLEg'></sub></form><legend id='EaLEg'></legend><bdo id='EaLEg'><pre id='EaLEg'><center id='EaLEg'></center></pre></bdo></b><th id='EaLEg'></th></span></q></dt></tr></i><div id='EaLEg'><tfoot id='EaLEg'></tfoot><dl id='EaLEg'><fieldset id='EaLEg'></fieldset></dl></div>
                            <tbody id='EaLEg'></tbody>