Skip to content

Commit

Permalink
add port support in PIM source and destination URL - FIX #70
Browse files Browse the repository at this point in the history
  • Loading branch information
brainOut committed Jul 3, 2018
1 parent 3e2aaf7 commit f2bf9ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private function askForBaseUri(string $defaultResponse): string
$validator = function ($answer) {
// This URI validation regex is intentionally imperfect.
// It's goal is only to avoid common mistakes like forgetting "http", or adding parameters from a copy/paste.
if (0 === preg_match('~^https?:\/\/[a-z0-9]+[a-z0-9\-\.]*[a-z0-9]+\/?$~i', $answer)) {
if (0 === preg_match('~^https?:\/\/[a-z0-9]+[a-z0-9\-\.]*[a-z0-9]+\/?(?:\:?\d{1,4})?$~i', $answer)) {
throw new \RuntimeException(
$this->translator->trans(
'from_source_pim_configured_to_source_pim_api_configured.on_source_pim_api_configuration.base_uri.error_message'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function onDestinationPimApiConfiguration(Event $event)
function ($answer) {
// This URI validation regex is intentionally imperfect.
// It's goal is only to avoid common mistakes like forgetting "http", or adding parameters from a copy/paste.
if (0 === preg_match('~^https?:\/\/[a-z0-9]+[a-z0-9\-\.]*[a-z0-9]+\/?$~i', $answer)) {
if (0 === preg_match('~^https?:\/\/[a-z0-9]+[a-z0-9\-\.]*[a-z0-9]+\/?(?:\:?\d{1,4})?$~i', $answer)) {
throw new \RuntimeException(
$this->translator->trans(
'from_destination_pim_downloaded_to_destination_pim_installed.on_destination_pim_api_configuration.base_uri.error_message'
Expand Down

0 comments on commit f2bf9ee

Please sign in to comment.