Allura/allura/lib/utils.py
def validate(cls, error_msg):
        '''Controller decorator to raise Invalid errors if bot protection is engaged'''
        def antispam_hook(remainder, params):
            '''Converts various errors in validate_request to a single Invalid message'''
            try:
                new_params = cls.validate_request(params=params)
                params.update(new_params)
            except (ValueError, TypeError, binascii.Error):
                raise Invalid(error_msg, params, None)
        return before_validate(antispam_hook)
Controller decorator to raise Invalid errors if bot protection is engaged
Controller decorator to raise Invalid errors if bot protection is engaged
Controller decorator to raise Invalid errors if bot protection is engaged
def validate(cls, error_msg):
        def antispam_hook(remainder, params):
            try:
                new_params = cls.validate_request(params=params)
                params.update(new_params)
            except (ValueError, TypeError, binascii.Error):
                raise Invalid(error_msg, params, None)
        return before_validate(antispam_hook)
def validate ( cls , error_msg ) : def antispam_hook ( remainder , params ) : '''Converts various errors in validate_request to a single Invalid message''' try : new_params = cls . validate_request ( params = params ) params . update ( new_params ) except ( ValueError , TypeError , binascii . Error ) : raise Invalid ( error_msg , params , None ) return before_validate ( antispam_hook )
Controller decorator to raise Invalid errors if bot protection is engaged
Controller decorator to raise Invalid errors if bot protection is engaged
'''Controller decorator to raise Invalid errors if bot protection is engaged''' '''Converts various errors in validate_request to a single Invalid message'''
cls
error_msg