Skip to content

Commit 250c515

Browse files
committed
update regex to include -
1 parent 532c4eb commit 250c515

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)