!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux web25.us.cloudlogin.co 5.10.237-xeon-hst #1 SMP Mon May 5 15:10:04 UTC 2025 x86_64 

uid=233359(alpastrology) gid=888(tty) groups=888(tty),33(tape) 

Safe-mode: OFF (not secure)

/usr/local/python-3.8/lib/python3.8/site-packages/mysql/connector/django/   drwxr-xr-x
Free 6182.18 GB of 6263.38 GB (98.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     validation.py (2.54 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# MySQL Connector/Python - MySQL driver written in Python.

import django

if django.VERSION >= (1, 8):
    from django.db.backends.base.validation import BaseDatabaseValidation
else:
    from django.db.backends import BaseDatabaseValidation

if django.VERSION < (1, 7):
    from django.db import models
else:
    from django.core import checks
    from django.db import connection


class DatabaseValidation(BaseDatabaseValidation):
    if django.VERSION < (1, 7):
        def validate_field(self, errors, opts, f):
            """
            MySQL has the following field length restriction:
            No character (varchar) fields can have a length exceeding 255
            characters if they have a unique index on them.
            """
            varchar_fields = (models.CharField,
                              models.CommaSeparatedIntegerField,
                              models.SlugField)
            if isinstance(f, varchar_fields) and f.max_length > 255 and f.unique:
                msg = ('"%(name)s": %(cls)s cannot have a "max_length" greater '
                       'than 255 when using "unique=True".')
                errors.add(opts, msg % {'name': f.name,
                                        'cls': f.__class__.__name__})

    else:
        def check_field(self, field, **kwargs):
            """
            MySQL has the following field length restriction:
            No character (varchar) fields can have a length exceeding 255
            characters if they have a unique index on them.
            """
            # Django 1.7
            errors = super(DatabaseValidation, self).check_field(field,
                                                                 **kwargs)

            # Ignore any related fields.
            if getattr(field, 'rel', None) is None:
                field_type = field.db_type(connection)

                if field_type is None:
                    return errors

                if (field_type.startswith('varchar')  # Look for CharFields...
                        and field.unique  # ... that are unique
                        and (field.max_length is None or
                                     int(field.max_length) > 255)):
                    errors.append(
                        checks.Error(
                            ('MySQL does not allow unique CharFields to have a '
                             'max_length > 255.'),
                            hint=None,
                            obj=field,
                            id='mysql.E001',
                        )
                )
            return errors

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0102 ]--