There was an error while loading. Please reload this page.
1 parent 67029aa commit 2d3ab5dCopy full SHA for 2d3ab5d
server/git-shell-commands/user-create
@@ -34,6 +34,11 @@ if [ -z "$PUBLIC_KEY" ]; then
34
exit 1
35
fi
36
37
+if (echo "$PUBLIC_KEY" | grep -xPq '^.*(\047|\042).*$'); then
38
+echo 'Disallowed characters in public key. Disallowed: '"'"', "'
39
+exit 1
40
+fi
41
+
42
# TODO(leon): Do we want to validate ssh-key type (e.g. rsa / ed25519 / ..)?
43
case "$PUBLIC_KEY" in
44
'ssh-'*)
0 commit comments