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

All magnet links currently fail #67

Closed
brian6932 opened this issue Oct 16, 2024 · 0 comments · Fixed by #69
Closed

All magnet links currently fail #67

brian6932 opened this issue Oct 16, 2024 · 0 comments · Fixed by #69

Comments

@brian6932
Copy link
Contributor

brian6932 commented Oct 16, 2024

Somewhat similar to #59, but not a Regex issue. Reproducible JS example:

await (await fetch('https://maglit.me/api/create', {
	__proto__: null,
	method: 'post',
	headers: {
		__proto__: null,
		'content-type': 'application/json'
	},
	body: `{"password":"","link":"magnet:?xt=urn:btih:737e24b5ab9e409cfc0ed80d93cba5b320396572","slug":"${Date.now().toString(36)}"}`
})).json()

All magnet links will result in the following response:

{"message":"Error checking the link."}

https://github.com/NayamAmarshe/MagLit/blob/e780c2010bd4d1e521b5e62b25c5c8b183b5a687/pages/api/create.js#L145
I believe e780c20 is at fault, and you're attempting to fetch() magnet links.
https://github.com/NayamAmarshe/MagLit/blob/e780c2010bd4d1e521b5e62b25c5c8b183b5a687/pages/api/create.js#L129-L147

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

Successfully merging a pull request may close this issue.

1 participant