Validation layer

Issue #1653 open
Daniel Zoller created an issue

currently the rest server and the web app is validating the data before the database logic persists it into the database. To validate the incoming data we have to implement it twice.

the better solution would be to move down the validation to the database, or between database and rest server or web app and write handlers for the web app and the rest server

Comments (4)

  1. Robert Jäschke

    That is true. This is a severe problem which causes some trouble.

    One example is, that posts created with the REST API are not cleaned and validated by our BibTeXParser. This way, one can create posts that contain a interhash and intrahash value in their misc field. Currently, this is also not overwritten on output, such that these posts contain TWO hashes in their API-XML (one as XML attribute, one in the misc field) which might be different! This causes many confusion and in the case of the JabRef plugin also some errors.

    I would suggest to add a validation layer on top of the DBLogic that is basically implementing the LogicInterface (don't know, if this makes sense). We could have also two additional layers: one for validation of content and one for checking authorization.

  2. Daniel Zoller reporter

    Please note that the rest-client is doing also some validation before executing a query to the api!

  3. Log in to comment