From ae11b451338161a81808a8d2b89562b4a5e11db4 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 3 Mar 2010 15:09:15 +0000 Subject: [PATCH] Added more validation for Eve API input --- sso/forms.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sso/forms.py b/sso/forms.py index cd04892..4a7f75a 100644 --- a/sso/forms.py +++ b/sso/forms.py @@ -10,6 +10,9 @@ class EveAPIForm(forms.Form): description = forms.CharField(max_length=100) def clean(self): + if not self.cleaned_data['user_id'].isdigit(): + raise forms.ValidationError("API User ID provided is not valid") + try: eaccount = EVEAccount.objects.get(api_user_id=self.cleaned_data['user_id']) except EVEAccount.DoesNotExist: