forked from 0x2620/pandora
remove ipv6 prefix from ipv4 addresses
This commit is contained in:
parent
45ff05ca49
commit
bc494f6c18
2 changed files with 2 additions and 1 deletions
|
@ -307,7 +307,6 @@ def resize_image(image_source, image_output, width=None, size=None):
|
|||
def timeline(
|
||||
video, prefix,
|
||||
modes=['antialias', 'slitscan', 'keyframes', 'audio', 'data'],
|
||||
#modes=['antialias', 'slitscan', 'audio', 'data'],
|
||||
size=[64, 16]
|
||||
):
|
||||
if isinstance(video, basestring):
|
||||
|
|
|
@ -96,6 +96,8 @@ class SessionData(models.Model):
|
|||
if request.user.is_authenticated():
|
||||
data.user = request.user
|
||||
data.ip = request.META['REMOTE_ADDR']
|
||||
if data.ip.startswith('::ffff:'):
|
||||
data.ip = data.ip[len('::ffff:'):]
|
||||
data.useragent = request.META['HTTP_USER_AGENT']
|
||||
data.info = json.loads(request.POST.get('data', '{}'))
|
||||
screen = data.info.get('screen', {})
|
||||
|
|
Loading…
Reference in a new issue