Skip to content

Commit 0c6b0b4

Browse files
author
David Cramer
authored
Merge pull request #100 from cloudinary/fix/CLOUD-433
update regex to include dashes as provided
2 parents 532c4eb + 250c515 commit 0c6b0b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-connect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function verify_connection( $data ) {
157157
}
158158

159159
// Pattern match to ensure validity of the provided url
160-
if ( ! preg_match( '~^(?:CLOUDINARY_URL=)?cloudinary://[0-9]+:[A-Za-z_0-9]+@[A-Za-z]+~', $data['cloudinary_url'] ) ) {
160+
if ( ! preg_match( '~^(?:CLOUDINARY_URL=)?cloudinary://[0-9]+:[A-Za-z_\-0-9]+@[A-Za-z]+~', $data['cloudinary_url'] ) ) {
161161
add_settings_error(
162162
'cloudinary_connect',
163163
'format_mismatch',

0 commit comments

Comments
 (0)