[ZendTo] 'Your Organization' field too long for database

Gretton, Liam liam.gretton at leicester.ac.uk
Thu Sep 17 10:45:56 BST 2020

As a quick fix on our site, I've edited templates/verify.tpl and added maxlength="32" to the senderOrganization input field definition.

Liam Gretton
Systems Specialist

IT Services,
University of Leicester, University Road, Leicester, LE1 7RH, UK

t: +44 (0)116 252 2254
e:  liam.gretton at leicester.ac.uk<mailto:liam.gretton at leicester.ac.uk>
w: www.le.ac.uk<http://www.le.ac.uk/>
[cid:image001.gif at 01D68CDF.B87E5110]
Follow us on Twitter<https://twitter.com/uniofleicester> or visit our Facebook<http://www.facebook.com/uniofleicester> page

From: jules at zend.to <jules at zend.to>
Sent: 17 September 2020 09:56
To: ZendTo Users <zendto at zend.to>
Cc: Gretton, Liam <liam.gretton at leicester.ac.uk>
Subject: Re: [ZendTo] 'Your Organization' field too long for database


Thank you for spotting that!

I will work out a fix (and an automatic way of quietly fixing the DB schema to extend this field) and put it in the next release.

BTW I assume you're using a MySQL DB back-end, yes?

On 17/09/2020 08:26, Gretton, Liam via ZendTo wrote:

When someone requests to drop-off a file, one of the fields to complete is 'Your organization'. If the user enters more than 32 characters here (which is not disallowed), then the form fails. The zendto log reports:

Error: Failed to add 2a753247dd272bb39c4547da5b44550f to authtable for user at example.com<mailto:user at example.com>. Error was Data too long for column 'Organization' at row 1

The column in the DB is only 32 characters, but the code is not truncating the data from the form before trying to push it in.

I'm currently running 6.03-5, though a check of the release notes of the newer versions doesn't mention a fix for this yet.

This has hit us with some collaborators whose organisations really do have long names such as ' Swiss Tropical and Public Health Institute' so my preference would be for the db field to be longer, and to have the code truncate anything that doesn't fit. If I can find time today I'll have a look through the code and try to submit a patch.



Liam Gretton
Systems Specialist

IT Services,
University of Leicester, University Road, Leicester, LE1 7RH, UK

t: +44 (0)116 252 2254
e:  liam.gretton at leicester.ac.uk<mailto:liam.gretton at leicester.ac.uk>
w: www.le.ac.uk<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.le.ac.uk%2F&data=02%7C01%7Cliam.gretton%40leicester.ac.uk%7C10a0200a50b74a0857aa08d85ae773e7%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637359297421298364&sdata=5QjX3n9TqQH7xAXDxC1%2BDpyZe8sKvSfpWpsofls%2B5q8%3D&reserved=0>
[cid:image001.gif at 01D68CDF.B87E5110]
Follow us on Twitter<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2Funiofleicester&data=02%7C01%7Cliam.gretton%40leicester.ac.uk%7C10a0200a50b74a0857aa08d85ae773e7%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637359297421298364&sdata=nhERR6NpTq8208K1yRRw9M75oRjPyqKbfocRlcbJ52E%3D&reserved=0> or visit our Facebook<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.facebook.com%2Funiofleicester&data=02%7C01%7Cliam.gretton%40leicester.ac.uk%7C10a0200a50b74a0857aa08d85ae773e7%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637359297421308357&sdata=%2FqgkbkOy7%2Bbc%2BO2u08gWB0rm588m8Co5D175UpQbaDA%3D&reserved=0> page


ZendTo mailing list

ZendTo at zend.to<mailto:ZendTo at zend.to>





'All the art of living lies in a fine mingling of letting go,

 and holding on.' - Henry Ellis


Twitter: @JulesFM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jul.es/pipermail/zendto/attachments/20200917/ae2c47c7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 3340 bytes
Desc: image001.gif
URL: <http://jul.es/pipermail/zendto/attachments/20200917/ae2c47c7/attachment-0001.gif>

More information about the ZendTo mailing list