#24202: Implement a SensitiveTextInput widget for sensitive input fields
-------------------------------+--------------------
     Reporter:  hakanw         |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Uncategorized  |    Version:  1.7
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 If you're implementing Stripe, Adyen, or other big payment solutions
 today, then you can use client side encryption, where form fields are used
 for inputting e.g. credit card number (etc), but that will be encrypted
 before the form is submitted to the server. These fields should not be
 sent raw to the server, so you usually remove the name attribute on the
 input fields.

 It would be really useful if django had a SensitiveTextInput widget that
 just removed its name attribute. This idea is from here:
 http://stackoverflow.com/questions/18116917/change-form-input-attribute-
 name-to-data-encrypted-name

 Suggested class:

 {{{python
 # a text input widget with no name attribute
 class SensitiveTextInput(forms.TextInput):
     def build_attrs(self, extra_attrs=None, **kwargs):
         attrs = super(SensitiveTextInput, self).build_attrs(extra_attrs,
 **kwargs)
         if 'name' in attrs:
             del attrs['name']
         return attrs
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24202>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.a128997ad6d68ff0a845a90c3d0a84a4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to