From 399b5e94b58536985893fa3080d96fdb2a01be51 Mon Sep 17 00:00:00 2001 From: mgbaybay Date: Mon, 7 Oct 2024 16:42:47 +0800 Subject: [PATCH] Remote Dataset: Fix for unexpected error for long URI string --- lib/Entity/DataSet.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Entity/DataSet.php b/lib/Entity/DataSet.php index 674f90e7e8..24d4551e90 100644 --- a/lib/Entity/DataSet.php +++ b/lib/Entity/DataSet.php @@ -887,6 +887,11 @@ public function validate() if ($this->rowLimit > $this->config->getSetting('DATASET_HARD_ROW_LIMIT')) { throw new InvalidArgumentException(__('DataSet row limit cannot be larger than the CMS dataSet row limit')); } + + // Check if the length is within the current URI character limit + if (!v::stringType()->length(null, 250)->validate($this->uri)) { + throw new InvalidArgumentException(__('URI can not be longer than 250 characters'), 'uri'); + } } try {