Check the address format #7

Closed
opened 2 years ago by kryfi · 9 comments
kryfi commented 2 years ago

It is possible for a user to enter any text. Todo add wow address regular expression check here.

It is possible for a user to enter any text. Todo add wow address regular expression check [here](https://git.wownero.com/wownero/YellWOWPages/src/commit/1765bcdd128b6885826e730f498fec64c2b7e0f5/yellow/routes.py#L39).
Collaborator

Added in here

Added in [here](https://git.wownero.com/wownero/YellWOWPages/pulls/9)
kryfi commented 2 years ago
Poster

Added in here

This will not protect you from text input by anyone, you need to check that it is a correct address: maybe a regular expression, for monero it's ^4[0-9AB][1-9A-HJ-NP-Za-km-z]{93}$, just need to make one for wownero.

> Added in [here](https://git.wownero.com/wownero/YellWOWPages/pulls/9) This will not protect you from text input by anyone, you need to check that it is a correct address: maybe a regular expression, for monero it's `^4[0-9AB][1-9A-HJ-NP-Za-km-z]{93}$`, just need to make one for wownero.
Collaborator

The isalnum() method returns True if all the characters are alphanumeric, meaning alphabet letter (a-z) and numbers (0-9).

`The isalnum() method returns True if all the characters are alphanumeric, meaning alphabet letter (a-z) and numbers (0-9).`
kryfi commented 2 years ago
Poster

The isalnum() method returns True if all the characters are alphanumeric, meaning alphabet letter (a-z) and numbers (0-9).

Ok but the code you suggested still allows someone to write: IHateW0wneroIHateW0wneroIHateW0wneroIHateW0wneroIHateW0wneroIHateW0wneroIHateW0wneroIHateW0wneroo.

> `The isalnum() method returns True if all the characters are alphanumeric, meaning alphabet letter (a-z) and numbers (0-9).` Ok but the code you suggested still allows someone to write: IHateW0wneroIHateW0wneroIHateW0wneroIHateW0wneroIHateW0wneroIHateW0wneroIHateW0wneroIHateW0wneroo.
Collaborator

Of course, I will submit a better check

Of course, I will submit a better check
Collaborator

Done in this commit

Done in [this commit](https://git.wownero.com/wownero/YellWOWPages/commit/e879f39c485e2542430a6a55d09fd4dfbc5236c3)
kryfi commented 2 years ago
Poster

Although you just mistyped "WW" --> "Wo" otherwise it looks perfect 👍

Although you just mistyped "WW" --> "Wo" otherwise it looks perfect 👍
Collaborator

This way users can only input sub addresses that are better for their privacy

This way users can only input sub addresses that are better for their privacy
kryfi commented 2 years ago
Poster

Oh ok no worries then :)

Oh ok no worries then :)
kryfi closed this issue 2 years ago
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: wownero/YellWOWPages#7
Loading…
There is no content yet.