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

Better input validation #1

Closed
silascutler opened this issue Jun 1, 2018 · 2 comments
Closed

Better input validation #1

silascutler opened this issue Jun 1, 2018 · 2 comments

Comments

@silascutler
Copy link

Some variable like fname in truthfinder.py are contingent upon user input containing a space. These should be checked / parsed to ensure a user enters data in the correct format:

Traceback (most recent call last):
  File "skiptracer.py", line 95, in <module>
    main()
  File "/home/XXXXXXXXXXXXX/.local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/XXXXXXXXXXXXX/.local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/XXXXXXXXXXXXX/.local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/XXXXXXXXXXXXX/.local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "skiptracer.py", line 73, in main
    TruthFinderGrabber().get_info(lookup,search_string)
  File "/home/XXXXXXXXXXXXX/skiptracer/plugins/truthfinder.py", line 171, in get_info
    self.truth_try(lookup,information)  # Actual logic to run + re-try request
  File "/home/XXXXXXXXXXXXX/skiptracer/plugins/truthfinder.py", line 97, in truth_try
    self.url = "https://www.truthfinder.com/results/?utm_source=VOTER&traffic%5Bsource%5D=VOTER&utm_medium=pre-pop&traffic%5Bmedium%5D=pre-pop&utm_campaign=&traffic%5Bcampaign%5D=srapi%3A&utm_term=1&traffic%5Bterm%5D=1&utm_content=&traffic%5Bcontent%5D=&s1=&s2=srapi&s3=1&s4=&s5=&city=&firstName={}&lastName={}&page=r&state={}{}&qLocation=true&qRelatives=true&qOver30={}".format(self.fname, self.lname, self.state, self.gndr, self.age)
AttributeError: TruthFinderGrabber instance has no attribute 'fname'

(Nice work on the project 👍 )

@xillwillx
Copy link
Owner

will fix as soon as I get back from Hushcon

@subinacls
Copy link
Collaborator

subinacls commented Jun 16, 2018

We have experimented with additional handling to ensure less errors within the application. Users should follow the required formats based on users having at minimal TWO names (Firstname[space]Lastname) - Additional UI has been developed to reduce this confusion.

rpigu-i pushed a commit that referenced this issue Aug 26, 2019
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

3 participants