File tree Expand file tree Collapse file tree 4 files changed +5
-7
lines changed
src/collective/volto/formsupport Expand file tree Collapse file tree 4 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1+ Update hCaptcha integration to use the new submit signature without remoteip, aligning with plone.formwidget.hcaptcha privacy (GDPR/LGPD) change. @alexandreIFB
Original file line number Diff line number Diff line change 7373 ],
7474 extras_require = {
7575 "hcaptcha" : [
76- "plone.formwidget.hcaptcha>=1.0.1 " ,
76+ "plone.formwidget.hcaptcha>=1.0.3 " ,
7777 ],
7878 "recaptcha" : [
7979 "plone.formwidget.recaptcha" ,
Original file line number Diff line number Diff line change @@ -46,10 +46,7 @@ def verify(self, data):
4646 )
4747 )
4848 token = data ["token" ]
49- remote_addr = self .request .get ("HTTP_X_FORWARDED_FOR" , "" ).split ("," )[0 ]
50- if not remote_addr :
51- remote_addr = self .request .get ("REMOTE_ADDR" )
52- res = submit (token , self .settings .private_key , remote_addr )
49+ res = submit (token , self .settings .private_key )
5350 if not res .is_valid :
5451 raise BadRequest (
5552 translate (
Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ def test_hcaptcha(
276276 },
277277 )
278278 transaction .commit ()
279- mock_submit .assert_called_once_with ("12345" , "private" , "127.0.0.1" )
279+ mock_submit .assert_called_once_with ("12345" , "private" )
280280 self .assertEqual (response .status_code , 400 )
281281 self .assertEqual (
282282 response .json ()["message" ],
@@ -301,7 +301,7 @@ def test_hcaptcha(
301301 },
302302 )
303303 transaction .commit ()
304- mock_submit .assert_called_once_with ("12345" , "private" , "127.0.0.1" )
304+ mock_submit .assert_called_once_with ("12345" , "private" )
305305 self .assertEqual (response .status_code , 200 )
306306
307307 def test_get_vocabulary (self ):
You can’t perform that action at this time.
0 commit comments