Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 为什么我会得到;网站或应用程序上的数据泄露暴露了您的密码。Chrome建议在“上更改密码”;SITENAME";现在。”;_Node.js_Reactjs_Rest_Google Chrome_Axios - Fatal编程技术网

Node.js 为什么我会得到;网站或应用程序上的数据泄露暴露了您的密码。Chrome建议在“上更改密码”;SITENAME";现在。”;

Node.js 为什么我会得到;网站或应用程序上的数据泄露暴露了您的密码。Chrome建议在“上更改密码”;SITENAME";现在。”;,node.js,reactjs,rest,google-chrome,axios,Node.js,Reactjs,Rest,Google Chrome,Axios,我创建了一个应用程序,它用bcrypt存储您的密码,表单的输入类型是password。我不明白为什么我会收到这个警报?为什么我会收到“网站或应用程序上的数据泄露暴露了你的密码。Chrome建议现在就更改你在“SITENAME”上的密码。” server.js app.post('/signup',异步(req,res)=>{ })代码显示正常。如果你使用的是谷歌浏览器,它有一个功能,如果你使用的密码以前被泄露,就会发出警告。因此,如果您使用通用密码进行测试,则可能会发生这种情况。如果这是生产,则

我创建了一个应用程序,它用bcrypt存储您的密码,表单的输入类型是password。我不明白为什么我会收到这个警报?为什么我会收到“网站或应用程序上的数据泄露暴露了你的密码。Chrome建议现在就更改你在“SITENAME”上的密码。”

server.js

app.post('/signup',异步(req,res)=>{


})

代码显示正常。如果你使用的是谷歌浏览器,它有一个功能,如果你使用的密码以前被泄露,就会发出警告。因此,如果您使用通用密码进行测试,则可能会发生这种情况。如果这是生产,则应按照警告指示更新密码


这是谷歌Chrome的一项新功能,用于检查密码泄露,您可以在这篇谷歌文章中阅读更多信息:

他们也有这个测试版API:
这样,我们就可以直接检查用户/密码是否被泄露,而不是依赖Chrome来通知用户/客户。

我在vercel开发环境中的应用程序内置react中遇到了同样的问题,我通过将密码更改为更复杂、更安全的密码来解决。也就是说,它与你的应用程序无关。这种情况会发生,虽然代码可能很好,但如果你处理好它会更好

我建议采用以下三个步骤:

  • 验证您的站点是否具有可用性
  • 报案
  • 在中注册您的站点

  • 最好的,

    谢谢你我在用abc考试及格,这让我很害怕
      axios.post(`/signup`, {
                    userBody: values.username,
                    passwordBody: values.password
                }).then(response => console.log(response))
                    .then(response => history.push('/login'))
                    .catch(error => {
                        setErrors({
                            error: error.response.status
                        })
                    })
            } else {
    
                alert('cant be empty fields')
            }
        }
    
    
    
    
    const today = new Date();
    const userData = {
        username: req.body.userBody,
        password: req.body.passwordBody,
        created: today
    };
    User.findOne({
        where: {
            username: req.body.userBody
        }
    })
        .then(user => {
            if (!user) {
                bcrypt.hash(req.body.passwordBody, 10, (err, hash) => {
                    userData.password = hash
                    User.create(userData)
                        .then(user => {
                            res.json({ status: user.username + " registered" })
                        })
                        .catch(err => {
                            res.send('error' + err)
                        })
    
                })
            }
            else {
                res.status(500).json({ message: 'message' })
                console.log('User exists')
            }
    
        })
        .catch(err => {
            res.send('error' + err)
        })