Hmm, now I think about it tightening up codenames could be problematic, as it would apply standards on what already existed. Same would be the case for filenames too.
Probably this should first be approached from a unit testing point of view. What is invalid (why), what is valid, write tests for those cases.
Then we can make a call if we need to accept we are tightening up on the existing ID specification or create something new. TBH I would probably rather break some compatibility than layer a lot of extra complexity into the system. Maybe we could consider that field.originalValue is let through codename JS validation somehow, regardless of if it would pass regex validation - and a similar kind of bypass server-side.
I do in general feel codenames should be very locked down.
I don't see how a testing point of view would help; some of the issues can be caused by user error... e.g. a user uploading a file with a large name. It can also be caused by XML database issues. It uses the values of all primary keys as the filename for the entry. We can't easily restrict these because then that would mean ensuring the total number of characters of all primary key columns do not exceed 60 characters. We could perhaps use a hash instead as it would keep all names under 60 characters, but it would also increase the average filename length which can be an issue given Windows also has a 260 character overall limit on the full path. And it's not easy to tell what it is that way without opening it.
Probably this should first be approached from a unit testing point of view. What is invalid (why), what is valid, write tests for those cases.
Then we can make a call if we need to accept we are tightening up on the existing ID specification or create something new. TBH I would probably rather break some compatibility than layer a lot of extra complexity into the system. Maybe we could consider that field.originalValue is let through codename JS validation somehow, regardless of if it would pass regex validation - and a similar kind of bypass server-side.
I do in general feel codenames should be very locked down.
I don't see how a testing point of view would help; some of the issues can be caused by user error... e.g. a user uploading a file with a large name. It can also be caused by XML database issues. It uses the values of all primary keys as the filename for the entry. We can't easily restrict these because then that would mean ensuring the total number of characters of all primary key columns do not exceed 60 characters. We could perhaps use a hash instead as it would keep all names under 60 characters, but it would also increase the average filename length which can be an issue given Windows also has a 260 character overall limit on the full path. And it's not easy to tell what it is that way without opening it.