Allow the period character when moving an entry by full DN.
authorMahlon E. Smith <mahlon@martini.nu>
Tue, 08 Dec 2015 00:54:14 -0800
changeset 82 57a1335691e5
parent 81 c39a13f112b6
child 83 23127a91eedf
Allow the period character when moving an entry by full DN. Reported by Carlos Jnr <carlos.jnr@gmail.com>.
shelldap
--- a/shelldap	Tue Dec 08 00:35:58 2015 -0800
+++ b/shelldap	Tue Dec 08 00:54:14 2015 -0800
@@ -864,7 +864,7 @@
 	foreach my $e ( @{ $s->{'entries'} } ) {
 		$ldif->write_entry( $e );
 	}
-	if( $use_pager ) {
+	if ( $use_pager ) {
 		system( $self->{'pager'}, $self->{'ldif_fname'} );
 		unlink $self->{'ldif_fname'};
 	}	
@@ -2083,8 +2083,8 @@
 
 	# see if we're moving the entry to a totally new path
 	my ( $new_dn, $old_dn );
-	( $d_dn, $new_dn ) = ( $1, $2 ) if $d_dn =~ /^([\-\w=]+),(.*)$/;
-	$old_dn = $1 if $s_dn =~ /^[\-\w=]+,(.*)$/;
+	( $d_dn, $new_dn ) = ( $1, $2 ) if $d_dn =~ /^([\.\-\w=]+),(.*)$/;
+	$old_dn = $1 if $s_dn =~ /^[\.\-\w=]+,(.*)$/;
 
 	my $moddn = sub {
 		return $self->ldap()->moddn(