Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame request input validation #509

Open
1 task done
cryptojcdenton opened this issue Oct 25, 2024 · 2 comments
Open
1 task done

Frame request input validation #509

cryptojcdenton opened this issue Oct 25, 2024 · 2 comments
Assignees

Comments

@cryptojcdenton
Copy link

cryptojcdenton commented Oct 25, 2024

Describe the bug

Hey Frog team, I am making a bug report on behalf of @artlu99, it seems that there is a lack of input validation for requests - we cannot figure out why this request body doesn't work on the frame url https://private-frame.artlu.xyz/api, for our client far.quest/cast.

// Here is all we are doing on `build.far.quest/v1/fetch-frame`:
const { proxyUrl, untrustedData, trustedData, action } = req.body;

 const response = await axios.post(proxyUrl, {
      untrustedData,
      trustedData,
 });

The frog server returns a 500 - I assume it should validate the input, and return a 400 for bad input, rather than an internal error.

His frog server on vercel show this error: TypeError: Invalid URL at new URL (node:internal) (the repo is here).

Would be helpful if there was some input validation for a frog frame server, thank you!

Link to Minimal Reproducible Example

https://github.com/artlu99/private-frame-artlu-xyz

Steps To Reproduce

Enter: https://private-frame.artlu.xyz/api to this test page:
https://far.quest/~/developers/frames

Server:

https://github.com/artlu99/private-frame-artlu-xyz

Frog Version

0.17.4

TypeScript Version

No response

Check existing issues

Anything else?

No response

@dalechyn dalechyn self-assigned this Oct 25, 2024
@dalechyn
Copy link
Collaborator

Thank you! Will check it on the weekend!

@dalechyn
Copy link
Collaborator

I don't think the Invalid URL error is thrown because of validation issue.

Can you please provide full error stacktrace? To know where exactly it threw it.

Also appreciate the repo but I could not reproduce it locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants