H
H
Hadmi2018-06-05 02:02:52
Django
Hadmi, 2018-06-05 02:02:52

Is request.user safe?

Good afternoon.
The whole point is in the name - how much can you trust the value of request.user?

if object.owner == request.user:
        object.delete()

If I do such a check before deleting an object, is this enough to protect against evil hackers or can this value be changed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2018-06-05
@hadmi

Read how the user's cookie is formed - if it is vulnerable, then spoofing is possible
In the current implementation, the problem is on the side of the http protocol, and not on the jung side
In the current implementation, spoofing is possible if an attacker stole the cookie from a legitimate user

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question