Changeset 118 in bookmarks
- Timestamp:
- 02/18/16 23:31:14 (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/bkmkd
r116 r118 47 47 %DEFINES, 48 48 }; 49 50 # if authentication is enabled and no digest_key is provided, generate one51 # don't do this if it isn't needed, since this is sometimes not a fast operation52 if ($config->{auth} && !$config->{digest_key}) {53 warn "Generating digest authentication secret...\n";54 require Bytes::Random::Secure;55 $config->{digest_key} = Bytes::Random::Secure::random_bytes_base64(16, '');56 }57 49 58 50 # make config paths absolute before handing off to the app -
trunk/lib/BookmarksApp.pm
r114 r118 122 122 $config->{realm} ||= 'Bookmarks'; 123 123 $config->{htdigest} or die "No htdigest configured for authentication\n"; 124 125 # if authentication is enabled and no digest_key is provided, generate one 126 # don't do this if it isn't needed, since this is sometimes not a fast operation 127 if (!$config->{digest_key}) { 128 warn "Generating digest authentication secret...\n"; 129 require Bytes::Random::Secure; 130 $config->{digest_key} = Bytes::Random::Secure::random_bytes_base64(16, ''); 131 } 132 124 133 open my $htdigest, '<', $config->{htdigest} or die "Can't open $$config{htdigest}\n"; 125 134 while (my $credentials = <$htdigest>) {
Note: See TracChangeset
for help on using the changeset viewer.