The application's source code has duplicate code, which may cause unexpected behaviors.
- Reduce the maintainability of the code.
- Facilitate the propagation of errors if the duplicate code contains any vulnerability.
Ensure that source code does not have classes, functions or repeated methods.
Authenticated attacker from the Internet.
⌚ 15 minutes.
Default score using CVSS 3.1. It may change depending on the context of the src.
Default score using CVSS 4.0. It may change depending on the context of the src.
There is no commented out code in the production environment
app.post("/register", function (req, res) {
var username = req.body.username
var password = req.body.password
User.register(new User({ username: username }),
password, function (err, user) {
if (err) {
return res.render("register");
}
});
});
There is duplicate code with the same functionality in a production stage
app.post("/register", function (req, res) {
var username = req.body.username
var password = req.body.password
User.register(new User({ username: username }),
password, function (err, user) {
if (err) {
return res.render("register");
}
});
});
app.post("/register", function (req, res) {
var username = req.body.username
var password = req.body.password
User.register(new User({ username: username }),
password, function (err, user) {
if (err) {
return res.render("register");
}
});
});