Video Woes 5-28-2020

28 May

After our hosting provider shifted to its new server which used Lucee instead of Adobe Coldfusion, a number of things went silly, and day before yesterday, I began debugging one of those great number of things that no longer worked right.

For a variety of reasons, only an editor can add a video to the website. It is done through the site’s administrative interface, and the process was simple enough, but not particularly elegrant.

After the switch to Lucee it became impossible to add new videos. It appeared that the information you supplied (called an Embed String) was somehow being corrupted by the site before it was added to the database. Moderately maddening. And difficult to troubleshoot.

It turned out that I was overly quick to blame Lucee (the CFML compiler). The real culprit was the setup of the new server. The server administrator had enable a feature that had been disabled on the server where we originally ran. This is called ‘GlobalSecurityProtect’. What it does is this: if you try to pass user supplied text within a website, it checks to make sure that certain html tags (which could be potentially dangerous) are suppressed. It replaces those tags with the word InvalidTag. And that was (I thought) the problem.

Further research revealed that this can be overriden on a local basis. So as far as the administrative interface was concerned, all I needed to do was override GlobalSecurityProtect for the admin app only. This posed no security threat as the admin interface is restricted to logged in Editors only.

Coded and tested, and voila! I could add a video. And it looked like crap. Why? When this code was written (more than five years ago) you could rely on YouTube to supply an Embed String with the height and width set to 640×390. And our page formatting depends on those two values. Now, before we save the Embed String we need to be able to show you a video we examine it, and if necessary change the height and width parameters to the values we need. About ten lines of CFML code were needed to accomplish this reliably. So…that little (cough, cough) problem has been fixed.

Leave a comment

Posted by on May 28, 2020 in Website


Comments are closed.

%d bloggers like this: