-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Que chille #121
Que chille #121
Conversation
…o, and anio fields
…ajes-de-error' into dev
This commit removes the "id" field from the Alumno model and alters the "dni" and "legajo" fields. The "id" field is no longer needed as it is automatically generated by Django. The "dni" field is now set as the primary key, and the "legajo" field is set as unique. These changes improve the data structure and integrity of the Alumno model.
Cookies.set('refresh_token', data.refresh); | ||
Cookies.set('access_expiration', data.access_expiration); | ||
Cookies.set('refresh_expiration', data.refresh_expiration); | ||
Cookies.set('username', data.user.username); | ||
Cookies.set('username', data.user.dni); |
Check warning
Code scanning / CodeQL
Clear text transmission of sensitive cookie Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 2 months ago
To fix the problem, we need to ensure that the username
cookie, along with other cookies, is only transmitted over HTTPS. This can be achieved by setting the secure
attribute when setting the cookies. Additionally, it is a good practice to set the httpOnly
attribute to prevent client-side scripts from accessing the cookies, further enhancing security.
- Modify the
Cookies.set
calls to include thesecure
andhttpOnly
attributes. - Ensure that all cookies set in the
FetchLogin
function are updated accordingly.
-
Copy modified lines R18-R22
@@ -17,7 +17,7 @@ | ||
console.log(data); | ||
Cookies.set('tokennn', data.access); | ||
Cookies.set('refresh_token', data.refresh); | ||
Cookies.set('access_expiration', data.access_expiration); | ||
Cookies.set('refresh_expiration', data.refresh_expiration); | ||
Cookies.set('username', data.user.dni); | ||
Cookies.set('tokennn', data.access, { secure: true, httpOnly: true }); | ||
Cookies.set('refresh_token', data.refresh, { secure: true, httpOnly: true }); | ||
Cookies.set('access_expiration', data.access_expiration, { secure: true, httpOnly: true }); | ||
Cookies.set('refresh_expiration', data.refresh_expiration, { secure: true, httpOnly: true }); | ||
Cookies.set('username', data.user.dni, { secure: true, httpOnly: true }); | ||
return data; |
No description provided.