Invalid Path with space at end possible
Tristan-H11 opened this issue · 4 comments
Tristan-H11 commented
TimJ0212 commented
I am just looking at the problem and I found the place (file-manager.component.ts#createDirectory()). It looks like there is already a suitable exception handling. The check would need to be adjusted (also/for the best solution) in the backend.
This would have to throw the exception via the websocket.
newFolder(name: string) {
this.fileService.createDirectory(this.delegate.device.uuid, name, this.currentFolder.uuid).subscribe({
error: (e: Error) => {
[...]
if (e.message === 'invalid_input_data') {
this.displayError('The specified folder name is not valid.');
}
[...]
}
});
}
Tristan-H11 commented
@TimJ0212 Very nice! Already figured out, that the backend needs to update their validations here. I'm going to create an issue later on.
Tristan-H11 commented
Defelo commented
fixed in cryptic-game/cryptic-device#104