예제 #1
0
파일: init.py 프로젝트: kent74cn/gitosis
def ssh_extract_user(pubkey):
    _, user = pubkey.rsplit(None, 1)
    if ssh.isSafeUsername(user):
        # gitolite alike: user.pub = [email protected], but user.pub != [email protected]
        if user.rfind("@") > user.rfind("."):
            user = user.rsplit("@", 1)[0]
        return user
    else:
        raise InsecureSSHKeyUsername(repr(user))
예제 #2
0
def ssh_extract_user(pubkey):
    _, user = pubkey.rsplit(None, 1)
    if ssh.isSafeUsername(user):
        # gitolite alike: user.pub = [email protected], but user.pub != [email protected]
        if user.rfind('@') > user.rfind('.'):
            user = user.rsplit('@', 1)[0]
        return user
    else:
        raise InsecureSSHKeyUsername(repr(user))
예제 #3
0
def ssh_extract_user(pubkey):
    _, user = pubkey.rsplit(None, 1)
    if ssh.isSafeUsername(user):
        return user
    else:
        raise InsecureSSHKeyUsername(repr(user))
예제 #4
0
파일: init.py 프로젝트: 1060460048/gitosis
def ssh_extract_user(pubkey):
    _, user = pubkey.rsplit(None, 1)
    if ssh.isSafeUsername(user):
        return user
    else:
        raise InsecureSSHKeyUsername(repr(user))