mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-11 09:03:40 +02:00
2021-04-27 Fred Gleason <fredg@paravelsystems.com>
* Changed the 'RDAIRPLAY_EXIT_PASSWORD' field from 'varchar(41)' to 'varchar(48)'. * Incremented the database version to 349. * Renamed the 'RDSha1Hash()' function to 'RDSha1HashFile()'. * Added 'RDSha1HashPassword()' function in 'lib/rdhash.[cpp|h]'. * Added 'RDSha1HashCheckPassword()' function in 'lib/rdhash.[cpp|h]'. * Changed the hashing algorithm used for the Exit Password for rdairplay(1) to salted SHA1. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -256,7 +256,7 @@ void Xport::Import()
|
||||
break;
|
||||
}
|
||||
if(resp_code==200) {
|
||||
cut->setSha1Hash(RDSha1Hash(RDCut::pathName(cut->cutName())));
|
||||
cut->setSha1Hash(RDSha1HashFile(RDCut::pathName(cut->cutName())));
|
||||
if(!title.isEmpty()) {
|
||||
cart->setTitle(title);
|
||||
}
|
||||
|
@@ -107,7 +107,7 @@ void Xport::SavePodcast()
|
||||
delete cast;
|
||||
XmlExit(err_msg.toUtf8(),500,"podcasts.cpp",LINE_NUMBER);
|
||||
}
|
||||
cast->setSha1Hash(RDSha1Hash(destpath));
|
||||
cast->setSha1Hash(RDSha1HashFile(destpath));
|
||||
|
||||
printf("Content-type: text/html; charset: UTF-8\n");
|
||||
printf("Status: 200\n\n");
|
||||
@@ -172,7 +172,7 @@ void Xport::GetPodcast()
|
||||
data=new char[st.st_blksize];
|
||||
n=read(fd,data,st.st_blksize);
|
||||
while(n>0) {
|
||||
write(1,data,n);
|
||||
n=write(1,data,n);
|
||||
n=read(fd,data,st.st_blksize);
|
||||
}
|
||||
delete data;
|
||||
|
@@ -59,7 +59,7 @@ void Xport::Rehash()
|
||||
delete cut;
|
||||
XmlExit("No such cut",404,"rdhash.cpp",LINE_NUMBER);
|
||||
}
|
||||
cut->setSha1Hash(RDSha1Hash(RDCut::pathName(cart_number,cut_number)));
|
||||
cut->setSha1Hash(RDSha1HashFile(RDCut::pathName(cart_number,cut_number)));
|
||||
delete cut;
|
||||
XmlExit("OK",200,"rdhash.cpp",LINE_NUMBER);
|
||||
}
|
||||
|
Reference in New Issue
Block a user