tracker issue : CF-4204405

select a category, or use search below
(searches all categories and all time range)
Title:

isValid("url") throws uncatch-able exception error if URL is too long (Java11)

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): James M. / ()

Created: 05/21/2019

Components: Language, Validation

Versions: 2016,2018

Failure Type: Crash

Found In Build/Fixed In Build: 2016,0,10,314028 / CF2016U12,CF2018U5

Priority/Frequency: Normal / Most users will encounter

Locale/System: English / Win 2016

Vote Count: 0

Problem Description:
When using Java11, URLs that exceed ~1560 characters cause ColdFusion to throw a show-stopping exception error and abort processing.

Steps to Reproduce:
Full sample source code available here:
https://gist.github.com/JamoCA/c84892f8d1da741d28f985be9227a60e
Generate a long URL and attempt to validate it using isValid("url").

Actual Result:
Unhandled Exception

Expected Result:
A boolean true or false

Any Workarounds:
Don't use the built-in function.  Use your UDF.
<cfscript>
function isURL(u){
	var response = true;
	var test = {};
	try {
		test = jURL.Init( javacast("string", arguments.u) );
	} catch(any e) {
		response = false;
	}
	return response;
}
</cfscript>

Attachments:

Comments:

Update received via email on 5/23/2019 (since there's no accessible change log): Frequency updated from 'Some users will encounter' to 'Most users will encounter' Version updated to '13.0' QUESTION: What's version "13"? The webpage details section still indicates "Version: 2016". Is this an internal reference AND does it reference 2016 or 2018... or a future hotfix #?
Comment by James M.
30812 | May 23, 2019 02:14:08 PM GMT