Skip to content

Commit a1609a9

Browse files
committed
Fixed possible issues with API communication caused by non-alphanumeric characters in request boundary
1 parent 5ad263b commit a1609a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/pdf-ninja.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ public function api_upload_file( $attachment_id )
705705
'key' => $this->get_key(),
706706
);
707707

708-
$boundary = wp_generate_password( 24 );
708+
$boundary = wp_generate_password( 48, $special_chars = false, $extra_special_chars = false );
709709

710710
$payload = "";
711711

@@ -892,7 +892,7 @@ private function api_pdf_helper( $destfile, $endpoint, $attachment_id, $data, $e
892892
$params[$key] = $value;
893893
}
894894

895-
$boundary = wp_generate_password( 24 );
895+
$boundary = wp_generate_password( 48, $special_chars = false, $extra_special_chars = false );
896896

897897
$payload = "";
898898

0 commit comments

Comments
 (0)