// get password from the database using a mysql query function fetch_password(string $username) {
And 7/10 parameters are vulnerable to SQL-injection. Here's the first:
global $mysqli;
$query = "SELECT password FROM users WHERE username = '$username'";
if ($result = $mysqli->query($query)) {
$row = $result->fetch_assoc();
return $row['password'];
}
return false;
Here's all of them: https://paste.ubuntu.com/p/9qQ2BSnqbF/I think there's a lot of old code that perhaps should not be used by Copilot as a reference, given how some programming languages have changed quite a bit over time when it comes to the best way of doing certain things.
Will it? Maybe.
Would I count on it in all cases? No.
Also, I find it preposterous to rely on a second automated system to cancel out the mistakes the first one made.
Downvote away. You know who you are.
Also, I just checked out an old Flask/Python project from 7 years ago, updated it to use Poetry dependency management, and it all still works. A JS project that is 7 months old and unmaintained would be a dumpster fire.