You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DataResource object has a field file_location = db.Column(db.String(256)). The location of an additional resource is restricted to 256 characters by the JSON schema of the validator. However, the parse_additional_resources function prepends an additional string (e.g. basepath) to the location before creating a DataResource object. This means that the file_location can exceed 256 characters even if the validator has checked that the original location is less than 256 characters.
Similarly for the DataResource object created in the process_data_file function, where the file_location is obtained by prepending an additional string to the data_file field, although in this case the JSON schema of the validator does not have any maxLength restriction.
Since the validator does not know the length of the additional string to be prepended to the location or data_file fields specified in the submission.yaml file, this check probably needs to be made in the web application code rather than in the validator code or via the JSON schema.
The text was updated successfully, but these errors were encountered:
The
DataResource
object has a fieldfile_location = db.Column(db.String(256))
. Thelocation
of an additional resource is restricted to 256 characters by the JSON schema of the validator. However, theparse_additional_resources
function prepends an additional string (e.g.basepath
) to thelocation
before creating aDataResource
object. This means that thefile_location
can exceed 256 characters even if the validator has checked that the originallocation
is less than 256 characters.Similarly for the
DataResource
object created in theprocess_data_file
function, where thefile_location
is obtained by prepending an additional string to thedata_file
field, although in this case the JSON schema of the validator does not have anymaxLength
restriction.Since the validator does not know the length of the additional string to be prepended to the
location
ordata_file
fields specified in thesubmission.yaml
file, this check probably needs to be made in the web application code rather than in the validator code or via the JSON schema.The text was updated successfully, but these errors were encountered: