From 75ad7ed6bec2237d3944b926490076bb3d22bdc9 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 30 Aug 2007 19:22:39 +0000 Subject: Do not require (or allow) principals to be qualified with the realm. --- perl/Wallet/Object/Keytab.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'perl/Wallet') diff --git a/perl/Wallet/Object/Keytab.pm b/perl/Wallet/Object/Keytab.pm index 8635bee..37cc5d9 100644 --- a/perl/Wallet/Object/Keytab.pm +++ b/perl/Wallet/Object/Keytab.pm @@ -32,10 +32,11 @@ $VERSION = '0.01'; # Make sure that principals are well-formed and don't contain characters that # will cause us problems when talking to kadmin. Takes a principal and -# returns true if it's okay, false otherwise. +# returns true if it's okay, false otherwise. Note that we do not permit +# realm information here. sub _valid_principal { my ($self, $principal) = @_; - if ($principal !~ m,^[\w-]+(/[\w_-]+)?\@[\w._-]+,) { + if ($principal !~ m,^[\w-]+(/[\w_-]+)?,) { return undef; } return 1; -- cgit v1.2.3