This file is indexed.

/usr/lib/python3/dist-packages/social/apps/flask_app/template_filters.py is in python3-social-auth 0.2.13-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from flask import g, request

from social.backends.utils import user_backends_data
from social.apps.flask_app.utils import get_helper


def backends():
    """Load Social Auth current user data to context under the key 'backends'.
    Will return the output of social.backends.utils.user_backends_data."""
    return {
        'backends': user_backends_data(g.user,
                                       get_helper('AUTHENTICATION_BACKENDS'),
                                       get_helper('STORAGE', do_import=True))
    }


def login_redirect():
    """Load current redirect to context."""
    value = request.form.get('next', '') or \
            request.args.get('next', '')
    return {
        'REDIRECT_FIELD_NAME': 'next',
        'REDIRECT_FIELD_VALUE': value,
        'REDIRECT_QUERYSTRING': value and ('next=' + value) or ''
    }