mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-12 15:52:29 +02:00
2017-04-05 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in 'web/rdxport/rdxport.cpp' that broke the CreateTicket web API call when connecting from localhost or the machines registered IP address.
This commit is contained in:
parent
23df8ca675
commit
9eb7c12b1a
@ -15712,3 +15712,7 @@
|
||||
2017-04-05 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a regression in 'lib/carts.cpp' that broke cut listings
|
||||
in the 'ListCarts' web API call.
|
||||
2017-04-05 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a regression in 'web/rdxport/rdxport.cpp' that broke
|
||||
the CreateTicket web API call when connecting from localhost
|
||||
or the machines registered IP address.
|
||||
|
@ -282,14 +282,11 @@ Xport::Xport(QObject *parent)
|
||||
|
||||
bool Xport::Authenticate()
|
||||
{
|
||||
QString name;
|
||||
QString passwd;
|
||||
QString ticket;
|
||||
int command;
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
unsigned char rawstr[1024];
|
||||
unsigned char sha1[SHA_DIGEST_LENGTH];
|
||||
QString name;
|
||||
QString passwd;
|
||||
|
||||
//
|
||||
// First, attempt ticket authentication
|
||||
@ -322,6 +319,7 @@ bool Xport::Authenticate()
|
||||
return false;
|
||||
}
|
||||
if((xport_post->clientAddress().toIPv4Address()>>24)==127) { // Localhost
|
||||
TryCreateTicket(name);
|
||||
return true;
|
||||
}
|
||||
sql=QString("select NAME from STATIONS where ")+
|
||||
@ -329,6 +327,7 @@ bool Xport::Authenticate()
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
delete q;
|
||||
TryCreateTicket(name);
|
||||
return true;
|
||||
}
|
||||
delete q;
|
||||
@ -339,6 +338,21 @@ bool Xport::Authenticate()
|
||||
if(!xport_user->checkPassword(passwd,false)) {
|
||||
return false;
|
||||
}
|
||||
TryCreateTicket(name);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Xport::TryCreateTicket(const QString &name)
|
||||
{
|
||||
QString ticket;
|
||||
QString passwd;
|
||||
int command;
|
||||
unsigned char rawstr[1024];
|
||||
unsigned char sha1[SHA_DIGEST_LENGTH];
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
if(xport_post->getValue("COMMAND",&command)) {
|
||||
if(command==RDXPORT_COMMAND_CREATETICKET) {
|
||||
@ -371,8 +385,6 @@ bool Xport::Authenticate()
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,6 +38,7 @@ class Xport : public QObject
|
||||
|
||||
private:
|
||||
bool Authenticate();
|
||||
void TryCreateTicket(const QString &name);
|
||||
void Export();
|
||||
void Import();
|
||||
void DeleteAudio();
|
||||
|
Loading…
x
Reference in New Issue
Block a user