isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

Is 59/fix/disallow special character as first character #699

Closed alexanderleegs closed 1 year ago

alexanderleegs commented 1 year ago

This PR replicates the frontend changes made to restrict the use of # as the first character in files and subcollection titles. To be reviewed in conjunction with PR #1231 on the isomercms frontend repo.

This PR also updates our logging for failure cases on these create/rename endpoints, as the error message was previously not very informative.

alexanderleegs commented 1 year ago

changes made look fine but just asking if we need to make the corresponding changes also onto v1 endpoints.

from the jekyll docs here, it seems like the special characters also shouldn't be part of directory names. at present, this is also only done for SubcollectionDirectoryService - should we do for collections + resources as a whole?

changes made look fine but just asking if we need to make the corresponding changes also onto v1 endpoints.

from the jekyll docs here, it seems like the special characters also shouldn't be part of directory names. at present, this is also only done for SubcollectionDirectoryService - should we do for collections + resources as a whole?

V1 endpoints for file/resource/directories don't have any type checking - we've thankfully managed to move completely off v1 for these endpoints as far as i know.

For the collections/resources, those already have even stricter restrictions (no symbols at all), so no changes to them required