Terralego/django-template-engines

View on GitHub
template_engines/templatetags/odt_tags.py

Summary

Maintainability
A
2 hrs
Test Coverage

Potential XSS on mark_safe function.
Open

        return mark_safe(ODT_IMAGE.format(full_name, width, height,
                                          anchor or "paragraph", f"image/{extension.lower()}"))

Standard pseudo-random generators are not suitable for security/cryptographic purposes.
Open

        ol_tag.attrs['xml:id'] = f'list{str(random.randint(100000000000000000, 900000000000000000))}'

Use of mark_safe() may expose cross-site scripting vulnerabilities and should be reviewed.
Open

    return mark_safe(str(soup))

Use of mark_safe() may expose cross-site scripting vulnerabilities and should be reviewed.
Open

        return mark_safe(ODT_IMAGE.format(full_name, width, height,
                                          anchor or "paragraph", f"image/{extension.lower()}"))

Standard pseudo-random generators are not suitable for security/cryptographic purposes.
Open

        ul_tag.attrs['xml:id'] = f'list{str(random.randint(100000000000000000, 900000000000000000))}'

Use of mark_safe() may expose cross-site scripting vulnerabilities and should be reviewed.
Open

        return mark_safe(ODT_IMAGE.format(full_name, width, height, anchor or "paragraph",
                                          f"image/{extension.lower()}"))

Potential XSS on mark_safe function.
Open

    return mark_safe(str(soup))

Potential XSS on mark_safe function.
Open

        return mark_safe(ODT_IMAGE.format(full_name, width, height, anchor or "paragraph",
                                          f"image/{extension.lower()}"))

File odt_tags.py has 267 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import base64
import logging
import random
import re
import secrets
Severity: Minor
Found in template_engines/templatetags/odt_tags.py - About 2 hrs to fix

    Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Wontfix

        def __init__(self, url, data=None, request=None, max_width=None,
    Severity: Minor
    Found in template_engines/templatetags/odt_tags.py - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status