mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-16 21:18:02 +00:00
Fix issue #15, only use the first part of the client IP - this dosn't happen in SQLite envs, since types are not enforced
This commit is contained in:
@@ -377,7 +377,7 @@ class ImportPhotoView(SuccessMessageMixin, TemplateView):
|
||||
if 'photo_Gravatar' in request.POST:
|
||||
photo = Photo()
|
||||
photo.user = request.user
|
||||
photo.ip_address = get_client_ip(request)
|
||||
photo.ip_address = get_client_ip(request)[0]
|
||||
if photo.import_image('Gravatar', addr):
|
||||
messages.success(request,
|
||||
_('Gravatar image successfully imported'))
|
||||
@@ -391,7 +391,7 @@ class ImportPhotoView(SuccessMessageMixin, TemplateView):
|
||||
if 'photo_Libravatar' in request.POST:
|
||||
photo = Photo()
|
||||
photo.user = request.user
|
||||
photo.ip_address = get_client_ip(request)
|
||||
photo.ip_address = get_client_ip(request)[0]
|
||||
if photo.import_image('Libravatar', addr):
|
||||
messages.success(request,
|
||||
_('Libravatar image successfully imported'))
|
||||
|
||||
Reference in New Issue
Block a user