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

Don't allow duplicate relays #1877

Closed
dmnyc opened this issue Jan 13, 2024 · 4 comments
Closed

Don't allow duplicate relays #1877

dmnyc opened this issue Jan 13, 2024 · 4 comments
Labels
duplicate This issue or pull request already exists relay technical

Comments

@dmnyc
Copy link

dmnyc commented Jan 13, 2024

Users should not be able to add the same relay twice.

Sometimes they will add them with minor syntax differences, such as:

wss://nos.lol
and
wss://nos.lol/

Damus should detect when a user is adding a relay they already have set and reject it.

@alltheseas
Copy link
Collaborator

I think this is a duplicate. @jb55 I dont think we have pushed out the trailing slash duplicate relay check yet, correct?

#1766 (comment)

@alltheseas alltheseas added the duplicate This issue or pull request already exists label Jan 13, 2024
@jb55
Copy link
Collaborator

jb55 commented Jan 13, 2024 via email

@alltheseas
Copy link
Collaborator

@mleku feedback:

a rule of URLs: sanitize them

like all user input, you can't trust it

make it into canonical form for the specific use never ever use any value from outside your code without making it clean and canonical

sql injections only worked because of lack of this processing

@alltheseas
Copy link
Collaborator

image

fixed 1.9 testflight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists relay technical
Projects
Archived in project
Development

No branches or pull requests

3 participants