validate_keys assumes all keys end in one or more '='

Bug #1018459 reported by Brad Crittenden
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ssh-import-id
Fix Released
Medium
Dustin Kirkland 

Bug Description

The public portion of an ssh key is base64 encoded, which uses '=' as padding at the end. It may require 0, 1, or 2 padding characters. Valid ssh keys may require no padding and may not end with '='

The regular expression used in validate_keys requires that the encoded portion of the key end with an '=':

keys=$(grep -c "^ssh-[dr]sa [a-zA-Z0-9: .\/=+-]\+= " "$1")

It should be changed to make the padding optional.

See https://launchpad.net/%7Efrankban/+sshkeys for a valid key that is thought to be invalid by ssh-import-lp-id.

Tags: trivial

Related branches

Brad Crittenden (bac)
tags: added: trivial
Changed in ssh-import:
importance: Undecided → Medium
status: New → In Progress
assignee: nobody → Dustin Kirkland (kirkland)
affects: ssh-import → ssh-import-id
Changed in ssh-import-id:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.