fnp
/
cas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
77383dd
)
Don't choke on bad input lines in ssh reporting.
author
Radek Czajka
<rczajka@rczajka.pl>
Mon, 19 Oct 2020 15:50:24 +0000
(17:50 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Mon, 19 Oct 2020 15:50:24 +0000
(17:50 +0200)
src/ssh_keys/views.py
patch
|
blob
|
history
diff --git
a/src/ssh_keys/views.py
b/src/ssh_keys/views.py
index
73ba3e9
..
dc16286
100644
(file)
--- a/
src/ssh_keys/views.py
+++ b/
src/ssh_keys/views.py
@@
-1,5
+1,4
@@
from datetime import datetime, timedelta
from datetime import datetime, timedelta
-import logging
import re
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib import messages
import re
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib import messages
@@
-48,7
+47,6
@@
class DeleteSSHKeyView(LoginRequiredMixin, DeleteView):
@csrf_exempt
def ssh_keys_seen(request):
@csrf_exempt
def ssh_keys_seen(request):
- logger = logging.getLogger('django.request')
key = request.GET.get('key')
service = get_object_or_404(Service, key=key)
n = now()
key = request.GET.get('key')
service = get_object_or_404(Service, key=key)
n = now()
@@
-61,8
+59,7
@@
def ssh_keys_seen(request):
continue
data = parse_log_line(line)
if data is None:
continue
data = parse_log_line(line)
if data is None:
- logger.error('Unparsed: ' + line)
- break
+ continue
dt = data['datetime']
algo = data['algo']
if 'md5' in data:
dt = data['datetime']
algo = data['algo']
if 'md5' in data: