GhostManager / Shepherd

A Django application to help red team operators manage a library of domain names
https://medium.com/@cmaddy/being-a-good-domain-shepherd-part-2-5e8597c3fe63
161 stars 37 forks source link

Error if client name does not exist #18

Closed chervaliery closed 1 year ago

chervaliery commented 4 years ago

The client field in the Checkout form is a free text area.

https://github.com/GhostManager/Shepherd/blob/dfba838ec4f5713110d8b1afd8b060734dfea9d0/catalog/forms.py#L19

Is there a reason it is not a ModelChoiceField like the Project Type to select from the client list ?

Because right now, there is an error if the client name does not exist.

Internal Server Error: /catalog/checkout/15
Traceback (most recent call last):
...
  File "/opt/Shepherd/catalog/views.py", line 123, in checkout
    client = Client.objects.get(name__iexact=client_name)
...
catalog.models.Client.DoesNotExist: Client matching query does not exist.