Skip to content
This repository has been archived by the owner on Jan 29, 2021. It is now read-only.

Bypassing validation #191

Open
aiphee opened this issue Mar 25, 2015 · 0 comments
Open

Bypassing validation #191

aiphee opened this issue Mar 25, 2015 · 0 comments

Comments

@aiphee
Copy link

aiphee commented Mar 25, 2015

Hi, i have this rule:

        public $actsAs = array( 
                                'Uploader.Attachment'     => array(
                                    'image_url' => array(
                                    )
                                ),

                                'Uploader.FileValidation' => array(
                                    'image_url' => array(
                                        'required'  => false,
                                        'extension' => array(
                                            'value' => array('jpg', 'jpeg'),
                                            'error' => 'Invalid extension'
                                        ),
                                        'mimeType'  => array(
                                            'value' => array('image/jpeg'),
                                            'error' => 'Invalid mime type'
                                        ),
                                        'type'      => array(
                                            'value' => 'image',
                                            'error' => 'Invalid type'
                                        )
                                    )
                                )
        );

But when i try to Upload renamed font.ttf to font.jpg, it stil uploads, m i doing something wrong?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant