X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Flaunchpad%2Fsrc%2Fssh_keys%2FsshKeyStore.js;h=7ae421b8ca53d8320af2b382d9be3c10b5c56c54;hp=400c0968e32aea583b39b95f98654b307f1ef5cc;hb=eb51acf7319a6207f7861a2ddc6c433662082ff4;hpb=e29efc315df33d546237e270470916e26df391d6 diff --git a/skyquake/plugins/launchpad/src/ssh_keys/sshKeyStore.js b/skyquake/plugins/launchpad/src/ssh_keys/sshKeyStore.js index 400c0968e..7ae421b8c 100644 --- a/skyquake/plugins/launchpad/src/ssh_keys/sshKeyStore.js +++ b/skyquake/plugins/launchpad/src/ssh_keys/sshKeyStore.js @@ -1,5 +1,5 @@ /* - * + * * Copyright 2016 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -174,10 +174,8 @@ export default class SshKeyStore { return {key: payload.key, name: payload.name}; } validate(data) { - for (let k in data) { - if((data[k].trim() == '') || ((/[^\w _-]/).test(data[k]))) { - return false; - } + if((data['name'].trim() == '') || ((/[^\w _-]/).test(data['name']))) { + return false; } return true; }