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
When a publiccode.yml file containing at least one duplicated key is uploaded, the editor throws an error saying Parsing error.
Steps to reproduce
Upload a publiccode.yml containing a duplicate key.
Expected behaviour
The js-yaml library has 2 possible load functions: load and safeLoad. First of all, I believe we should switch to safeLoad since it's recommended when dealing with untrusted sources. Then, safeLoad raises an Exception which we should catch and, when possible, expose the relevant error. In this particular case, the error should not be generic but it should say Parsing error: duplicate key found or something like that.
Actual behaviour
A generic error is shown and it's not possible to continue.
The text was updated successfully, but these errors were encountered:
Subject of the issue
When a publiccode.yml file containing at least one duplicated key is uploaded, the editor throws an error saying
Parsing error
.Steps to reproduce
Upload a publiccode.yml containing a duplicate key.
Expected behaviour
The
js-yaml
library has 2 possible load functions:load
andsafeLoad
. First of all, I believe we should switch tosafeLoad
since it's recommended when dealing with untrusted sources. Then,safeLoad
raises an Exception which we should catch and, when possible, expose the relevant error. In this particular case, the error should not be generic but it should sayParsing error: duplicate key found
or something like that.Actual behaviour
A generic error is shown and it's not possible to continue.
The text was updated successfully, but these errors were encountered: