[lml] push by schl...@schapiro.org - * bugfix. vsphere password hiding would not work if the pasword contai... on 2012-01-24 17:28 GMT

0 views
Skip to first unread message

l...@googlecode.com

unread,
Jan 24, 2012, 12:29:10 PM1/24/12
to lml-...@googlegroups.com
Revision: a32b0c6253d3
Author: Schlomo Schapiro <l...@schlomo.schapiro.org>
Date: Tue Jan 24 09:28:32 2012
Log: * bugfix. vsphere password hiding would not work if the pasword
contains a special char.
http://code.google.com/p/lml/source/detail?r=a32b0c6253d3

Modified:
/web/www/boot/lml/index.pl

=======================================
--- /web/www/boot/lml/index.pl Wed May 4 06:36:09 2011
+++ /web/www/boot/lml/index.pl Tue Jan 24 09:28:32 2012
@@ -98,10 +98,12 @@
local $/=undef;
open FILE, "</etc/lml.conf";
binmode FILE;
- $confdata = escapeHTML(<FILE>);
+ $confdata = <FILE>;
close FILE;
}
-$confdata =~ s/$CONFIG{vsphere}{password}/*******************/g;
+my $quoted_password = quotemeta($CONFIG{vsphere}{password});
+$confdata =~ s/$quoted_password/*******************/g;
+$confdata = escapeHTML($confdata);
print <<EOF;
$confdata
</pre>

Reply all
Reply to author
Forward
0 new messages