cleaner blocking code
thanks kleis!
This commit is contained in:
parent
399fba2124
commit
c7baa4535a
@ -1313,13 +1313,9 @@ vips_block_untrusted_set_operation( VipsOperationClass *class, gboolean *state )
|
||||
{
|
||||
g_assert( VIPS_IS_OPERATION_CLASS( class ) );
|
||||
|
||||
if( class->flags & VIPS_OPERATION_UNTRUSTED ) {
|
||||
GTypeClass *type_class = (GTypeClass *) class;
|
||||
GType gtype = type_class->g_type;
|
||||
const char *name = g_type_name( gtype );
|
||||
|
||||
vips_operation_block_set( name, *state );
|
||||
}
|
||||
if( class->flags & VIPS_OPERATION_UNTRUSTED )
|
||||
vips_operation_block_set( G_OBJECT_CLASS_NAME( class ),
|
||||
*state );
|
||||
|
||||
return( NULL );
|
||||
}
|
||||
|
@ -196,9 +196,10 @@
|
||||
* @VIPS_OPERATION_DEPRECATED means this is an old operation kept in vips for
|
||||
* compatibility only and should be hidden from users.
|
||||
*
|
||||
* @VIPS_OPERATION_UNTRUSTED means the operation depends on external libraries which have
|
||||
* not been hardened against attack. It should probably not be used on untrusted input.
|
||||
* Use vips_operation_block_untrusted() to block all untrusted operations.
|
||||
* @VIPS_OPERATION_UNTRUSTED means the operation depends on external libraries
|
||||
* which have not been hardened against attack. It should probably not be used
|
||||
* on untrusted input. Use vips_block_untrusted_set() to block all
|
||||
* untrusted operations.
|
||||
*
|
||||
* @VIPS_OPERATION_BLOCKED means the operation is prevented from executing. Use
|
||||
* vips_operation_block_set() to enable and disable groups of operations.
|
||||
|
Loading…
Reference in New Issue
Block a user