Merge lp:~maxiberta/canonical-identity-provider/drop-account-registration-captcha-api-v1 into lp:canonical-identity-provider/release
- drop-account-registration-captcha-api-v1
- Merge into trunk
Proposed by
Maximiliano Bertacchini
Status: | Merged |
---|---|
Approved by: | Maximiliano Bertacchini |
Approved revision: | no longer in the source branch. |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | lp:~maxiberta/canonical-identity-provider/drop-account-registration-captcha-api-v1 |
Merge into: | lp:canonical-identity-provider/release |
Prerequisite: | lp:~maxiberta/canonical-identity-provider/disable-user-registration-api |
Diff against target: |
341 lines (+19/-97) 6 files modified
src/api/templates/api/wadl1.0.xml (+2/-2) src/api/templates/api/wadl1.1.xml (+2/-2) src/api/v10/forms.py (+0/-23) src/api/v10/handlers.py (+10/-22) src/api/v10/tests/test_forms.py (+0/-24) src/api/v10/tests/test_handlers.py (+5/-24) |
To merge this branch: | bzr merge lp:~maxiberta/canonical-identity-provider/drop-account-registration-captcha-api-v1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guillermo Gonzalez | Approve | ||
Review via email: mp+356876@code.launchpad.net |
Commit message
Drop captcha from account registration API v1.x.
Description of the change
Account registration captcha has been disabled for a long time (years?). And the implementation depends on reCaptcha v1 which is dead since March 2018. So, let's just drop all captcha bits from there.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src/api/templates/api/wadl1.0.xml' | |||
2 | --- src/api/templates/api/wadl1.0.xml 2017-06-12 16:00:39 +0000 | |||
3 | +++ src/api/templates/api/wadl1.0.xml 2018-10-22 16:11:43 +0000 | |||
4 | @@ -562,14 +562,14 @@ | |||
5 | 562 | required="true" fixed="register"> | 562 | required="true" fixed="register"> |
6 | 563 | <wadl:doc>The name of the operation being invoked.</wadl:doc> | 563 | <wadl:doc>The name of the operation being invoked.</wadl:doc> |
7 | 564 | </wadl:param> | 564 | </wadl:param> |
9 | 565 | <wadl:param style="query" required="true" | 565 | <wadl:param style="query" required="false" |
10 | 566 | name="captcha_solution"> | 566 | name="captcha_solution"> |
11 | 567 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> | 567 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
12 | 568 | Solution for the generated captcha. | 568 | Solution for the generated captcha. |
13 | 569 | </wadl:doc> | 569 | </wadl:doc> |
14 | 570 | 570 | ||
15 | 571 | </wadl:param> | 571 | </wadl:param> |
17 | 572 | <wadl:param style="query" required="true" | 572 | <wadl:param style="query" required="false" |
18 | 573 | name="captcha_id"> | 573 | name="captcha_id"> |
19 | 574 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> | 574 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
20 | 575 | ID for the generated captcha | 575 | ID for the generated captcha |
21 | 576 | 576 | ||
22 | === modified file 'src/api/templates/api/wadl1.1.xml' | |||
23 | --- src/api/templates/api/wadl1.1.xml 2017-06-12 16:00:39 +0000 | |||
24 | +++ src/api/templates/api/wadl1.1.xml 2018-10-22 16:11:43 +0000 | |||
25 | @@ -568,14 +568,14 @@ | |||
26 | 568 | required="true" fixed="register"> | 568 | required="true" fixed="register"> |
27 | 569 | <wadl:doc>The name of the operation being invoked.</wadl:doc> | 569 | <wadl:doc>The name of the operation being invoked.</wadl:doc> |
28 | 570 | </wadl:param> | 570 | </wadl:param> |
30 | 571 | <wadl:param style="query" required="true" | 571 | <wadl:param style="query" required="false" |
31 | 572 | name="captcha_solution"> | 572 | name="captcha_solution"> |
32 | 573 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> | 573 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
33 | 574 | Solution for the generated captcha. | 574 | Solution for the generated captcha. |
34 | 575 | </wadl:doc> | 575 | </wadl:doc> |
35 | 576 | 576 | ||
36 | 577 | </wadl:param> | 577 | </wadl:param> |
38 | 578 | <wadl:param style="query" required="true" | 578 | <wadl:param style="query" required="false" |
39 | 579 | name="captcha_id"> | 579 | name="captcha_id"> |
40 | 580 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> | 580 | <wadl:doc xmlns="http://www.w3.org/1999/xhtml"> |
41 | 581 | ID for the generated captcha | 581 | ID for the generated captcha |
42 | 582 | 582 | ||
43 | === modified file 'src/api/v10/forms.py' | |||
44 | --- src/api/v10/forms.py 2015-05-08 19:25:27 +0000 | |||
45 | +++ src/api/v10/forms.py 2018-10-22 16:11:43 +0000 | |||
46 | @@ -5,17 +5,12 @@ | |||
47 | 5 | 5 | ||
48 | 6 | from __future__ import unicode_literals | 6 | from __future__ import unicode_literals |
49 | 7 | 7 | ||
50 | 8 | from django import forms | ||
51 | 9 | from django.forms import fields | 8 | from django.forms import fields |
52 | 10 | from django.utils.translation import ugettext_lazy as _ | ||
53 | 11 | 9 | ||
54 | 12 | from identityprovider.forms import NewAccountForm | 10 | from identityprovider.forms import NewAccountForm |
55 | 13 | from identityprovider.models.captcha import Captcha | ||
56 | 14 | 11 | ||
57 | 15 | 12 | ||
58 | 16 | class WebserviceCreateAccountForm(NewAccountForm): | 13 | class WebserviceCreateAccountForm(NewAccountForm): |
59 | 17 | captcha_id = fields.CharField(max_length=1024) | ||
60 | 18 | captcha_solution = fields.CharField(max_length=256) | ||
61 | 19 | remote_ip = fields.CharField(max_length=256) | 14 | remote_ip = fields.CharField(max_length=256) |
62 | 20 | platform = fields.TypedChoiceField(choices=[ | 15 | platform = fields.TypedChoiceField(choices=[ |
63 | 21 | ('web', 'Web'), ('desktop', 'Desktop'), ('mobile', 'Mobile')], | 16 | ('web', 'Web'), ('desktop', 'Desktop'), ('mobile', 'Mobile')], |
64 | @@ -38,21 +33,3 @@ | |||
65 | 38 | if not validate_redirect_to: | 33 | if not validate_redirect_to: |
66 | 39 | validate_redirect_to = None | 34 | validate_redirect_to = None |
67 | 40 | return validate_redirect_to | 35 | return validate_redirect_to |
68 | 41 | |||
69 | 42 | def clean(self): | ||
70 | 43 | cleaned_data = super(WebserviceCreateAccountForm, self).clean() | ||
71 | 44 | captcha_id = cleaned_data.get('captcha_id') | ||
72 | 45 | captcha_solution = cleaned_data.get('captcha_solution') | ||
73 | 46 | |||
74 | 47 | # The remote IP address is absolutely required, and comes from | ||
75 | 48 | # SSO itself, not from the client. If it's missing, it's a | ||
76 | 49 | # programming error, and should not be returned to the client | ||
77 | 50 | # as a validation error. So, we use a normal key lookup here. | ||
78 | 51 | remote_ip = cleaned_data['remote_ip'] | ||
79 | 52 | |||
80 | 53 | captcha = Captcha(captcha_id) | ||
81 | 54 | email = cleaned_data.get('email', '') | ||
82 | 55 | if captcha.verify(captcha_solution, remote_ip, email): | ||
83 | 56 | return cleaned_data | ||
84 | 57 | # not verified | ||
85 | 58 | raise forms.ValidationError(_("Wrong captcha solution.")) | ||
86 | 59 | 36 | ||
87 | === modified file 'src/api/v10/handlers.py' | |||
88 | --- src/api/v10/handlers.py 2018-10-22 15:10:24 +0000 | |||
89 | +++ src/api/v10/handlers.py 2018-10-22 16:11:43 +0000 | |||
90 | @@ -36,9 +36,6 @@ | |||
91 | 36 | EmailAddress, | 36 | EmailAddress, |
92 | 37 | get_team_memberships_for_user, | 37 | get_team_memberships_for_user, |
93 | 38 | ) | 38 | ) |
94 | 39 | from identityprovider.models.captcha import ( | ||
95 | 40 | VerifyCaptchaError, | ||
96 | 41 | ) | ||
97 | 42 | from identityprovider.models.const import AuthTokenType, EmailStatus | 39 | from identityprovider.models.const import AuthTokenType, EmailStatus |
98 | 43 | from identityprovider.signals import ( | 40 | from identityprovider.signals import ( |
99 | 44 | account_created, | 41 | account_created, |
100 | @@ -189,25 +186,16 @@ | |||
101 | 189 | data = request.data | 186 | data = request.data |
102 | 190 | data['remote_ip'] = request.environ['REMOTE_ADDR'] | 187 | data['remote_ip'] = request.environ['REMOTE_ADDR'] |
103 | 191 | form = WebserviceCreateAccountForm(data) | 188 | form = WebserviceCreateAccountForm(data) |
123 | 192 | try: | 189 | if not form.is_valid(): |
124 | 193 | if not form.is_valid(): | 190 | errors = dict((k, map(unicode, v)) |
125 | 194 | errors = dict((k, map(unicode, v)) | 191 | for (k, v) in form.errors.items()) |
126 | 195 | for (k, v) in form.errors.items()) | 192 | # XXX: cope with client trimming error messages |
127 | 196 | # XXX: cope with client trimming error messages | 193 | if unicode(PASSWORD_LEAKED) in errors.get('password', ''): |
128 | 197 | if unicode(PASSWORD_LEAKED) in errors.get('password', ''): | 194 | errors['password'] = unicode(_( |
129 | 198 | errors['password'] = unicode(_( | 195 | 'unsafe: leaked by security breach ' |
130 | 199 | 'unsafe: leaked by security breach ' | 196 | 'on another website')) |
131 | 200 | 'on another website')) | 197 | result = {'status': 'error', 'errors': errors} |
132 | 201 | result = {'status': 'error', 'errors': errors} | 198 | return result |
114 | 202 | return result | ||
115 | 203 | except VerifyCaptchaError: | ||
116 | 204 | logger.exception("reCaptcha connection error") | ||
117 | 205 | msg = unicode( | ||
118 | 206 | _('Unable to verify captcha. Please try again shortly.')) | ||
119 | 207 | return { | ||
120 | 208 | 'status': 'error', | ||
121 | 209 | 'errors': {'captcha_solution': [msg]} | ||
122 | 210 | } | ||
133 | 211 | 199 | ||
134 | 212 | cleaned_data = form.cleaned_data | 200 | cleaned_data = form.cleaned_data |
135 | 213 | requested_email = cleaned_data['email'] | 201 | requested_email = cleaned_data['email'] |
136 | 214 | 202 | ||
137 | === modified file 'src/api/v10/tests/test_forms.py' | |||
138 | --- src/api/v10/tests/test_forms.py 2015-11-24 14:38:04 +0000 | |||
139 | +++ src/api/v10/tests/test_forms.py 2018-10-22 16:11:43 +0000 | |||
140 | @@ -5,23 +5,12 @@ | |||
141 | 5 | 5 | ||
142 | 6 | from __future__ import unicode_literals | 6 | from __future__ import unicode_literals |
143 | 7 | 7 | ||
144 | 8 | from django.test.utils import override_settings | ||
145 | 9 | |||
146 | 10 | from api.v10.forms import WebserviceCreateAccountForm | 8 | from api.v10.forms import WebserviceCreateAccountForm |
147 | 11 | from identityprovider.tests.utils import SSOBaseTestCase | 9 | from identityprovider.tests.utils import SSOBaseTestCase |
148 | 12 | 10 | ||
149 | 13 | 11 | ||
150 | 14 | @override_settings(CAPTCHA_PUBLIC_KEY='public', CAPTCHA_PRIVATE_KEY='private') | ||
151 | 15 | class WebServiceCreateAccountFormTestCase(SSOBaseTestCase): | 12 | class WebServiceCreateAccountFormTestCase(SSOBaseTestCase): |
152 | 16 | 13 | ||
153 | 17 | def setUp(self): | ||
154 | 18 | super(WebServiceCreateAccountFormTestCase, self).setUp() | ||
155 | 19 | # patch Captcha so it never hits the real network | ||
156 | 20 | self.mock_captcha_open = self.patch( | ||
157 | 21 | 'identityprovider.models.captcha.Captcha._open') | ||
158 | 22 | self.mock_captcha_open.return_value.is_error = False | ||
159 | 23 | self.mock_captcha_open.return_value.data.return_value = 'true\nyey' | ||
160 | 24 | |||
161 | 25 | def test_nonascii_password(self): | 14 | def test_nonascii_password(self): |
162 | 26 | data = {'password': 'Curuzú Cuatiá', | 15 | data = {'password': 'Curuzú Cuatiá', |
163 | 27 | 'remote_ip': '127.0.0.1'} | 16 | 'remote_ip': '127.0.0.1'} |
164 | @@ -46,19 +35,6 @@ | |||
165 | 46 | self.assertTrue(form.is_valid()) | 35 | self.assertTrue(form.is_valid()) |
166 | 47 | self.assertEqual(form.cleaned_data['platform'], 'desktop') | 36 | self.assertEqual(form.cleaned_data['platform'], 'desktop') |
167 | 48 | 37 | ||
168 | 49 | def test_captcha_checked_for_whitelist(self): | ||
169 | 50 | data = { | ||
170 | 51 | 'email': 'canonicaltest@gmail.com', | ||
171 | 52 | 'password': 'password1A', | ||
172 | 53 | 'captcha_id': '1', | ||
173 | 54 | 'captcha_solution': '2', | ||
174 | 55 | 'remote_ip': '127.0.0.1', | ||
175 | 56 | } | ||
176 | 57 | pattern = '^canonicaltest(?:\+.+)?@gmail\.com$' | ||
177 | 58 | with self.settings(EMAIL_WHITELIST_REGEXP_LIST=[pattern]): | ||
178 | 59 | form = WebserviceCreateAccountForm(data) | ||
179 | 60 | self.assertTrue(form.is_valid()) | ||
180 | 61 | |||
181 | 62 | def test_default_cleaned_validate_redirect_to(self): | 38 | def test_default_cleaned_validate_redirect_to(self): |
182 | 63 | data = { | 39 | data = { |
183 | 64 | 'email': 'some@email.com', | 40 | 'email': 'some@email.com', |
184 | 65 | 41 | ||
185 | === modified file 'src/api/v10/tests/test_handlers.py' | |||
186 | --- src/api/v10/tests/test_handlers.py 2018-10-22 15:10:24 +0000 | |||
187 | +++ src/api/v10/tests/test_handlers.py 2018-10-22 16:11:43 +0000 | |||
188 | @@ -173,8 +173,7 @@ | |||
189 | 173 | email_validated=False) | 173 | email_validated=False) |
190 | 174 | 174 | ||
191 | 175 | response = self.api.registrations.register( | 175 | response = self.api.registrations.register( |
194 | 176 | email='register@example.com', password='blogdf3Daa', | 176 | email='register@example.com', password='blogdf3Daa') |
193 | 177 | captcha_solution='solution', captcha_id='id') | ||
195 | 178 | 177 | ||
196 | 179 | self.assertEqual(response['errors'], | 178 | self.assertEqual(response['errors'], |
197 | 180 | {'email': ["Email already registered"]}) | 179 | {'email': ["Email already registered"]}) |
198 | @@ -184,8 +183,7 @@ | |||
199 | 184 | email = 'pepe@foo.com' | 183 | email = 'pepe@foo.com' |
200 | 185 | 184 | ||
201 | 186 | response = self.api.registrations.register( | 185 | response = self.api.registrations.register( |
204 | 187 | email=email, password='MySecretPassword1', | 186 | email=email, password='MySecretPassword1') |
203 | 188 | captcha_solution='foobar', captcha_id='id') | ||
205 | 189 | self.assertEqual(response['status'], 'ok') | 187 | self.assertEqual(response['status'], 'ok') |
206 | 190 | 188 | ||
207 | 191 | account = Account.objects.get_by_email(email) | 189 | account = Account.objects.get_by_email(email) |
208 | @@ -208,8 +206,7 @@ | |||
209 | 208 | self.factory.make_leaked_credential(email=email, password=password) | 206 | self.factory.make_leaked_credential(email=email, password=password) |
210 | 209 | 207 | ||
211 | 210 | response = self.api.registrations.register( | 208 | response = self.api.registrations.register( |
214 | 211 | email=email, password=password, | 209 | email=email, password=password) |
213 | 212 | captcha_solution='foobar', captcha_id='id') | ||
215 | 213 | self.assertEqual(response['status'], 'error') | 210 | self.assertEqual(response['status'], 'error') |
216 | 214 | self.assertEqual( | 211 | self.assertEqual( |
217 | 215 | response['errors'], | 212 | response['errors'], |
218 | @@ -223,7 +220,6 @@ | |||
219 | 223 | 220 | ||
220 | 224 | response = self.api.registrations.register( | 221 | response = self.api.registrations.register( |
221 | 225 | email=email, password='MySecretPassword1', | 222 | email=email, password='MySecretPassword1', |
222 | 226 | captcha_solution='foobar', captcha_id='id', | ||
223 | 227 | displayname='Test User') | 223 | displayname='Test User') |
224 | 228 | self.assertEqual(response['status'], 'ok') | 224 | self.assertEqual(response['status'], 'ok') |
225 | 229 | 225 | ||
226 | @@ -242,7 +238,6 @@ | |||
227 | 242 | 238 | ||
228 | 243 | response = self.api.registrations.register( | 239 | response = self.api.registrations.register( |
229 | 244 | email=email, password='MySecretPassword1', | 240 | email=email, password='MySecretPassword1', |
230 | 245 | captcha_solution='foobar', captcha_id='id', | ||
231 | 246 | displayname='Test User') | 241 | displayname='Test User') |
232 | 247 | 242 | ||
233 | 248 | self.assertEqual(response['status'], 'ok') | 243 | self.assertEqual(response['status'], 'ok') |
234 | @@ -259,7 +254,6 @@ | |||
235 | 259 | # password: 8 characters long (no uppercase or numbers, only lowercase) | 254 | # password: 8 characters long (no uppercase or numbers, only lowercase) |
236 | 260 | response = self.api.registrations.register( | 255 | response = self.api.registrations.register( |
237 | 261 | email=email, password='abcdefgh', | 256 | email=email, password='abcdefgh', |
238 | 262 | captcha_solution='foobar', captcha_id='id', | ||
239 | 263 | displayname='Test User') | 257 | displayname='Test User') |
240 | 264 | self.assertEqual(response['status'], 'ok') | 258 | self.assertEqual(response['status'], 'ok') |
241 | 265 | 259 | ||
242 | @@ -271,8 +265,7 @@ | |||
243 | 271 | email = self.factory.make_email_address() | 265 | email = self.factory.make_email_address() |
244 | 272 | 266 | ||
245 | 273 | response = self.api.registrations.register( | 267 | response = self.api.registrations.register( |
248 | 274 | email=email, password='MySecretPassword1', | 268 | email=email, password='MySecretPassword1') |
247 | 275 | captcha_solution='foobar', captcha_id='id') | ||
249 | 276 | self.assertEqual(response['status'], 'ok') | 269 | self.assertEqual(response['status'], 'ok') |
250 | 277 | self.assert_new_user_email_sent(email) | 270 | self.assert_new_user_email_sent(email) |
251 | 278 | 271 | ||
252 | @@ -281,7 +274,6 @@ | |||
253 | 281 | 274 | ||
254 | 282 | response = self.api.registrations.register( | 275 | response = self.api.registrations.register( |
255 | 283 | email=email, password='MySecretPassword1', | 276 | email=email, password='MySecretPassword1', |
256 | 284 | captcha_solution='foobar', captcha_id='id', | ||
257 | 285 | platform='mobile') | 277 | platform='mobile') |
258 | 286 | self.assertEqual(response['status'], 'ok') | 278 | self.assertEqual(response['status'], 'ok') |
259 | 287 | self.assert_new_user_email_sent(email, 'mobile') | 279 | self.assert_new_user_email_sent(email, 'mobile') |
260 | @@ -291,7 +283,6 @@ | |||
261 | 291 | 283 | ||
262 | 292 | response = self.api.registrations.register( | 284 | response = self.api.registrations.register( |
263 | 293 | email=email, password='MySecretPassword1', | 285 | email=email, password='MySecretPassword1', |
264 | 294 | captcha_solution='foobar', captcha_id='id', | ||
265 | 295 | platform='foo') | 286 | platform='foo') |
266 | 296 | 287 | ||
267 | 297 | self.assertEqual(response['status'], 'error') | 288 | self.assertEqual(response['status'], 'error') |
268 | @@ -303,7 +294,6 @@ | |||
269 | 303 | 294 | ||
270 | 304 | response = self.api.registrations.register( | 295 | response = self.api.registrations.register( |
271 | 305 | email=email_address, password='MySecretPassword1', | 296 | email=email_address, password='MySecretPassword1', |
272 | 306 | captcha_solution='foobar', captcha_id='id', | ||
273 | 307 | platform='desktop') | 297 | platform='desktop') |
274 | 308 | 298 | ||
275 | 309 | self.assertEqual(response['status'], 'ok') | 299 | self.assertEqual(response['status'], 'ok') |
276 | @@ -314,7 +304,6 @@ | |||
277 | 314 | 304 | ||
278 | 315 | response = self.api.registrations.register( | 305 | response = self.api.registrations.register( |
279 | 316 | email=email_address, password='MySecretPassword1', | 306 | email=email_address, password='MySecretPassword1', |
280 | 317 | captcha_solution='foobar', captcha_id='id', | ||
281 | 318 | platform='desktop', validate_redirect_to='http://foo') | 307 | platform='desktop', validate_redirect_to='http://foo') |
282 | 319 | 308 | ||
283 | 320 | self.assertEqual(response['status'], 'ok') | 309 | self.assertEqual(response['status'], 'ok') |
284 | @@ -327,7 +316,6 @@ | |||
285 | 327 | 316 | ||
286 | 328 | response = self.api.registrations.register( | 317 | response = self.api.registrations.register( |
287 | 329 | email=email_address, password='MySecretPassword1', | 318 | email=email_address, password='MySecretPassword1', |
288 | 330 | captcha_solution='foobar', captcha_id='id', | ||
289 | 331 | platform='mobile', validate_redirect_to='http://foo') | 319 | platform='mobile', validate_redirect_to='http://foo') |
290 | 332 | 320 | ||
291 | 333 | self.assertEqual(response['status'], 'ok') | 321 | self.assertEqual(response['status'], 'ok') |
292 | @@ -341,7 +329,6 @@ | |||
293 | 341 | 329 | ||
294 | 342 | response = self.api.registrations.register( | 330 | response = self.api.registrations.register( |
295 | 343 | email=email_address, password='MySecretPassword1', | 331 | email=email_address, password='MySecretPassword1', |
296 | 344 | captcha_solution='foobar', captcha_id='id', | ||
297 | 345 | platform='mobile') | 332 | platform='mobile') |
298 | 346 | 333 | ||
299 | 347 | self.assertEqual(response['status'], 'ok') | 334 | self.assertEqual(response['status'], 'ok') |
300 | @@ -385,9 +372,7 @@ | |||
301 | 385 | self.url, | 372 | self.url, |
302 | 386 | {'ws.op': 'register', | 373 | {'ws.op': 'register', |
303 | 387 | 'email': email_address, | 374 | 'email': email_address, |
307 | 388 | 'password': 'MySecretPassword1', | 375 | 'password': 'MySecretPassword1'}) |
305 | 389 | 'captcha_solution': 'foobar', | ||
306 | 390 | 'captcha_id': 'id'}) | ||
308 | 391 | 376 | ||
309 | 392 | @switches(USER_REGISTRATION_API_ENABLED=False) | 377 | @switches(USER_REGISTRATION_API_ENABLED=False) |
310 | 393 | def test_feature_flag_disabled_with_internal_client(self): | 378 | def test_feature_flag_disabled_with_internal_client(self): |
311 | @@ -396,7 +381,6 @@ | |||
312 | 396 | data = { | 381 | data = { |
313 | 397 | 'ws.op': 'register', 'displayname': 'Test User', 'email': email, | 382 | 'ws.op': 'register', 'displayname': 'Test User', 'email': email, |
314 | 398 | 'password': 'MySecretPassword1', | 383 | 'password': 'MySecretPassword1', |
315 | 399 | 'captcha_solution': 'foobar', 'captcha_id': 'id', | ||
316 | 400 | } | 384 | } |
317 | 401 | 385 | ||
318 | 402 | response = self.client.get(self.url, data) | 386 | response = self.client.get(self.url, data) |
319 | @@ -413,7 +397,6 @@ | |||
320 | 413 | data = { | 397 | data = { |
321 | 414 | 'ws.op': 'register', 'displayname': 'Test User', 'email': email, | 398 | 'ws.op': 'register', 'displayname': 'Test User', 'email': email, |
322 | 415 | 'password': 'MySecretPassword1', | 399 | 'password': 'MySecretPassword1', |
323 | 416 | 'captcha_solution': 'foobar', 'captcha_id': 'id', | ||
324 | 417 | } | 400 | } |
325 | 418 | headers = {'HTTP_X_FORWARDED_FOR': '127.0.0.1'} | 401 | headers = {'HTTP_X_FORWARDED_FOR': '127.0.0.1'} |
326 | 419 | 402 | ||
327 | @@ -429,7 +412,6 @@ | |||
328 | 429 | data = { | 412 | data = { |
329 | 430 | 'ws.op': 'register', 'displayname': 'Test User', 'email': email, | 413 | 'ws.op': 'register', 'displayname': 'Test User', 'email': email, |
330 | 431 | 'password': 'MySecretPassword1', | 414 | 'password': 'MySecretPassword1', |
331 | 432 | 'captcha_solution': 'foobar', 'captcha_id': 'id', | ||
332 | 433 | } | 415 | } |
333 | 434 | 416 | ||
334 | 435 | response = self.client.get(self.url, data) | 417 | response = self.client.get(self.url, data) |
335 | @@ -446,7 +428,6 @@ | |||
336 | 446 | data = { | 428 | data = { |
337 | 447 | 'ws.op': 'register', 'displayname': 'Test User', 'email': email, | 429 | 'ws.op': 'register', 'displayname': 'Test User', 'email': email, |
338 | 448 | 'password': 'MySecretPassword1', | 430 | 'password': 'MySecretPassword1', |
339 | 449 | 'captcha_solution': 'foobar', 'captcha_id': 'id', | ||
340 | 450 | } | 431 | } |
341 | 451 | headers = {'HTTP_X_FORWARDED_FOR': '127.0.0.1'} | 432 | headers = {'HTTP_X_FORWARDED_FOR': '127.0.0.1'} |
342 | 452 | 433 |
LGTM