From 3b51f6bb5a728ec0c447f76bf53782751a85c43f Mon Sep 17 00:00:00 2001 From: g0w6y Date: Sun, 5 Apr 2026 21:29:07 +0530 Subject: [PATCH] fix(examples): prevent reflected XSS by encoding var_export() output --- examples/recaptcha-request-curl.php | 6 +++--- examples/recaptcha-request-post.php | 6 +++--- examples/recaptcha-request-socket.php | 6 +++--- examples/recaptcha-v2-checkbox-explicit.php | 6 +++--- examples/recaptcha-v2-checkbox.php | 6 +++--- examples/recaptcha-v2-invisible.php | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/examples/recaptcha-request-curl.php b/examples/recaptcha-request-curl.php index 2c81d05..5fe0629 100644 --- a/examples/recaptcha-request-curl.php +++ b/examples/recaptcha-request-curl.php @@ -87,7 +87,7 @@ // In production, *always* sanitise and validate your input' ?>

POST data

-
+

Success!

-
+

That's it. Everything is working. Go integrate this into your real project.

Try again

Something went wrong

-
+

Check the error code reference at https://developers.google.com/recaptcha/docs/verify#error-code-reference.

Note: Error code missing-input-response may mean the user just didn't complete the reCAPTCHA.

Try again

diff --git a/examples/recaptcha-request-post.php b/examples/recaptcha-request-post.php index 24b109e..e223a8b 100644 --- a/examples/recaptcha-request-post.php +++ b/examples/recaptcha-request-post.php @@ -86,7 +86,7 @@ // In production, *always* sanitise and validate your input' ?>

POST data

-
+

Success!

-
+

That's it. Everything is working. Go integrate this into your real project.

Try again

Something went wrong

-
+

Check the error code reference at https://developers.google.com/recaptcha/docs/verify#error-code-reference.

Note: Error code missing-input-response may mean the user just didn't complete the reCAPTCHA.

Try again

diff --git a/examples/recaptcha-request-socket.php b/examples/recaptcha-request-socket.php index 949b7bf..f9b4dc2 100644 --- a/examples/recaptcha-request-socket.php +++ b/examples/recaptcha-request-socket.php @@ -85,7 +85,7 @@ // In production, *always* sanitise and validate your input' ?>

POST data

-
+

Success!

-
+

That's it. Everything is working. Go integrate this into your real project.

Try again

Something went wrong

-
+

Check the error code reference at https://developers.google.com/recaptcha/docs/verify#error-code-reference.

Note: Error code missing-input-response may mean the user just didn't complete the reCAPTCHA.

Try again

diff --git a/examples/recaptcha-v2-checkbox-explicit.php b/examples/recaptcha-v2-checkbox-explicit.php index 2b6fb4e..3079521 100644 --- a/examples/recaptcha-v2-checkbox-explicit.php +++ b/examples/recaptcha-v2-checkbox-explicit.php @@ -84,7 +84,7 @@ // In production, *always* sanitise and validate your input' ?>

POST data

-
+

Success!

-
+

That's it. Everything is working. Go integrate this into your real project.

Try again

Something went wrong

-
+

Check the error code reference at https://developers.google.com/recaptcha/docs/verify#error-code-reference.

Note: Error code missing-input-response may mean the user just didn't complete the reCAPTCHA.

Try again

diff --git a/examples/recaptcha-v2-checkbox.php b/examples/recaptcha-v2-checkbox.php index d0a4846..124f59b 100644 --- a/examples/recaptcha-v2-checkbox.php +++ b/examples/recaptcha-v2-checkbox.php @@ -84,7 +84,7 @@ // In production, *always* sanitise and validate your input' ?>

POST data

-
+

Success!

-
+

That's it. Everything is working. Go integrate this into your real project.

Try again

Something went wrong

-
+

Check the error code reference at https://developers.google.com/recaptcha/docs/verify#error-code-reference.

Note: Error code missing-input-response may mean the user just didn't complete the reCAPTCHA.

Try again

diff --git a/examples/recaptcha-v2-invisible.php b/examples/recaptcha-v2-invisible.php index b7e174b..4c6347d 100644 --- a/examples/recaptcha-v2-invisible.php +++ b/examples/recaptcha-v2-invisible.php @@ -84,7 +84,7 @@ // In production, *always* sanitise and validate your input' ?>

POST data

-
+

Success!

-
+

That's it. Everything is working. Go integrate this into your real project.

Try again

Something went wrong

-
+

Check the error code reference at https://developers.google.com/recaptcha/docs/verify#error-code-reference.

Note: Error code missing-input-response may mean the user just didn't complete the reCAPTCHA.

Try again