P5.js-web-editor: Folder can be renamed to "" empty string

Created on 25 Mar 2019  路  7Comments  路  Source: processing/p5.js-web-editor

Nature of issue?

  • Found a bug

Details about the bug:

It is possible to clear the name of a folder by renaming it to "" and files can be renamed to only contain a valid extension (".js", ".css" etc.).
Moreover two or more folders with an empty name ("") can be contained in the same folder which will probably cause issues.

  • Web browser and version: Chrome 71.0.3578.98
  • Operating System: Windows and Linux
  • Steps to reproduce this bug:

    1. Create a folder with a proper name.

    2. Click rename in the file navigator.

    3. Clear the name of the folder and click outside of it.

Screenshot_20190325_220842

good first issue help wanted high bug

Most helpful comment

Looks like a bug to me , will fix this soon!

All 7 comments

Looks like a bug to me , will fix this soon!

thanks for reporting! this is a bug and i can reproduce.

@catarak I think just adding a length cap might work?

I think as discussed on https://github.com/processing/p5.js-web-editor/pull/962#issuecomment-475330642 we should also add some validations at the backend and s3

i think there should be frontend and backend validations.

I'm a first time contributor, is this still open for me to work on?

Hey sure , go for it ! What you need to do to counter this one.

  1. Add backend model level validations for folder name
  2. Add a front end validation or some sort of min length validation
  3. I think we have some prs already doing the 1 , you can pick up (2).

If you have any doubt , most people here will be happy to help(or just tag me).
Congratulations of your first oss project.
Cheers!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hellonearthis picture hellonearthis  路  4Comments

byfelipesanchez picture byfelipesanchez  路  4Comments

aldrinjenson picture aldrinjenson  路  4Comments

willingc picture willingc  路  5Comments

slowizzm picture slowizzm  路  4Comments