Skip to content

Commit

Permalink
Remove prefixed commas from headers when saving (#1503)
Browse files Browse the repository at this point in the history
  • Loading branch information
forgetso authored Nov 11, 2024
2 parents 7830f1a + 9411651 commit 0b40af3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/provider/src/api/captcha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export function prosopoRouter(env: ProviderEnvironment): Router {
datasetId,
user,
getIPAddress(req.ip || ""),
flatten(req.headers, ","),
flatten(req.headers),
);
const captchaResponse: CaptchaResponseBody = {
[ApiParams.status]: "ok",
Expand Down Expand Up @@ -194,7 +194,7 @@ export function prosopoRouter(env: ProviderEnvironment): Router {
Number.parseInt(parsed[ApiParams.timestamp]),
parsed[ApiParams.signature].provider.requestHash,
getIPAddress(req.ip || "").bigInt(),
flatten(req.headers, ","),
flatten(req.headers),
);

const returnValue: CaptchaSolutionResponse = {
Expand Down Expand Up @@ -303,7 +303,7 @@ export function prosopoRouter(env: ProviderEnvironment): Router {
challenge.difficulty,
challenge.providerSignature,
getIPAddress(req.ip || "").bigInt(),
flatten(req.headers, ","),
flatten(req.headers),
);

const getPowCaptchaResponse: GetPowCaptchaResponse = {
Expand Down Expand Up @@ -397,7 +397,7 @@ export function prosopoRouter(env: ProviderEnvironment): Router {
verifiedTimeout,
signature.user.timestamp,
getIPAddress(req.ip || ""),
flatten(req.headers, ","),
flatten(req.headers),
);
const response: PowCaptchaSolutionResponse = { status: "ok", verified };
return res.json(response);
Expand Down

0 comments on commit 0b40af3

Please sign in to comment.