Weasyl / SOFT

For migrating FA accounts to Weasyl
MIT License
4 stars 1 forks source link

Correction should check live DB for existence of account #8

Open skylerbunny opened 10 years ago

skylerbunny commented 10 years ago

It is possible to submit a correction to a Weasyl username, pointing to an account which does not exist.

Steps to reproduce:

  1. Paste in a username to check against, e.g. 'GraemeLion'.
  2. Make a correction to this username, completely nonsensical. 'j3kjkl3jkljflkj3lkjflkjklj'
  3. Click 'Correction'.
  4. SOFT happily creates this bogus entry as a possible account for GraemeLion.

SOFT should check against the database to prevent entries like this from being created. weykent mentions https://github.com/Weasyl/conbadger/blob/master/conbadge.py#L91-L92 as an example of a tool which uses this API endpoint for that purpose.

Doing the above would implicitly fix another potential error which can happen, which is putting entries into the database that are improperly formatted, such as with invalid characters, leading or trailing spaces, etc.