21777e4 When reading SSH pub key don't assume last character is newline

Authored and Committed by rcritten 4 years ago
    When reading SSH pub key don't assume last character is newline
    
    The code was attempting to strip off any trailing newline and then
    calling lstrip() on the rest.
    
    This assumes that the key has a trailing newline. At best this
    can cause the last character of the comment to be lost. If there
    is no comment it will fail to load the key because it is invalid.
    
    Patch by FĂ©lix-Antoine Fortin <felix-antoine.fortin@calculquebec.ca>
    
    https://pagure.io/freeipa/issue/7959
    
    Signed-off-by: Rob Crittenden <rcritten@redhat.com>
    Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
    Reviewed-By: Christian Heimes <cheimes@redhat.com>
    
        
file modified
+3 -2