A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/django/django/commit/454f2fb93437f98917283336201b4048293f7582 below:

[3.2.x] Fixed CVE-2023-36053 -- Prevented potential ReDoS in EmailVal… · django/django@454f2fb · GitHub

@@ -422,11 +422,18 @@ class SignupForm(Form):

422 422

get_spam = BooleanField()

423 423 424 424

f = SignupForm(auto_id=False)

425 -

self.assertHTMLEqual(str(f['email']), '<input type="email" name="email" required>')

425 +

self.assertHTMLEqual(

426 +

str(f["email"]),

427 +

'<input type="email" name="email" maxlength="320" required>',

428 +

)

426 429

self.assertHTMLEqual(str(f['get_spam']), '<input type="checkbox" name="get_spam" required>')

427 430 428 431

f = SignupForm({'email': 'test@example.com', 'get_spam': True}, auto_id=False)

429 -

self.assertHTMLEqual(str(f['email']), '<input type="email" name="email" value="test@example.com" required>')

432 +

self.assertHTMLEqual(

433 +

str(f["email"]),

434 +

'<input type="email" name="email" maxlength="320" value="test@example.com" '

435 +

"required>",

436 +

)

430 437

self.assertHTMLEqual(

431 438

str(f['get_spam']),

432 439

'<input checked type="checkbox" name="get_spam" required>',

@@ -2824,7 +2831,7 @@ class Person(Form):

2824 2831

<option value="true">Yes</option>

2825 2832

<option value="false">No</option>

2826 2833

</select></li>

2827 -

<li><label for="id_email">Email:</label> <input type="email" name="email" id="id_email"></li>

2834 +

<li><label for="id_email">Email:</label> <input type="email" name="email" id="id_email" maxlength="320"></li>

2828 2835

<li class="required error"><ul class="errorlist"><li>This field is required.</li></ul>

2829 2836

<label class="required" for="id_age">Age:</label> <input type="number" name="age" id="id_age" required></li>"""

2830 2837

)

@@ -2840,7 +2847,7 @@ class Person(Form):

2840 2847

<option value="true">Yes</option>

2841 2848

<option value="false">No</option>

2842 2849

</select></p>

2843 -

<p><label for="id_email">Email:</label> <input type="email" name="email" id="id_email"></p>

2850 +

<p><label for="id_email">Email:</label> <input type="email" name="email" id="id_email" maxlength="320"></p>

2844 2851

<ul class="errorlist"><li>This field is required.</li></ul>

2845 2852

<p class="required error"><label class="required" for="id_age">Age:</label>

2846 2853

<input type="number" name="age" id="id_age" required></p>"""

@@ -2859,7 +2866,7 @@ class Person(Form):

2859 2866

<option value="false">No</option>

2860 2867

</select></td></tr>

2861 2868

<tr><th><label for="id_email">Email:</label></th><td>

2862 -

<input type="email" name="email" id="id_email"></td></tr>

2869 +

<input type="email" name="email" id="id_email" maxlength="320"></td></tr>

2863 2870

<tr class="required error"><th><label class="required" for="id_age">Age:</label></th>

2864 2871

<td><ul class="errorlist"><li>This field is required.</li></ul>

2865 2872

<input type="number" name="age" id="id_age" required></td></tr>"""

@@ -3489,7 +3496,7 @@ class CommentForm(Form):

3489 3496

f = CommentForm(data, auto_id=False, error_class=DivErrorList)

3490 3497

self.assertHTMLEqual(f.as_p(), """<p>Name: <input type="text" name="name" maxlength="50"></p>

3491 3498

<div class="errorlist"><div class="error">Enter a valid email address.</div></div>

3492 -

<p>Email: <input type="email" name="email" value="invalid" required></p>

3499 +

<p>Email: <input type="email" name="email" value="invalid" maxlength="320" required></p>

3493 3500

<div class="errorlist"><div class="error">This field is required.</div></div>

3494 3501

<p>Comment: <input type="text" name="comment" required></p>""")

3495 3502

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4