#31438: Current user in form.
-------------------------------+--------------------------------------
     Reporter:  marc-dms       |                    Owner:  nobody
         Type:  Bug            |                   Status:  closed
    Component:  Documentation  |                  Version:  3.0
     Severity:  Normal         |               Resolution:  invalid
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by felixxm):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 > On the other hand hiding the field and using the following code
 **exposes the id and opens a backdoor to malicious code that would modify
 the hidden field**.
 > {{{
 > def get_initial(self): return { 'created_by': self.request.user }
 > }}}
 >
 > Could the doc rather suggest a solution that would solve both issues?

 I don't see such recommendation anywhere in the docs. Moreover you cannot
 add a hidden field if an user ID is sensitive for you. It's a support
 question and Trac is not a support channel.


 Closing per TicketClosingReasons/UseSupportChannels.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31438#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.eac99f293d4d2c4a6bfe9274a677a69d%40djangoproject.com.

Reply via email to