mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-16 14:13:37 +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>
|
2017-04-05 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a regression in 'lib/carts.cpp' that broke cut listings
|
* Fixed a regression in 'lib/carts.cpp' that broke cut listings
|
||||||
in the 'ListCarts' web API call.
|
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()
|
bool Xport::Authenticate()
|
||||||
{
|
{
|
||||||
QString name;
|
|
||||||
QString passwd;
|
|
||||||
QString ticket;
|
QString ticket;
|
||||||
int command;
|
|
||||||
QString sql;
|
QString sql;
|
||||||
RDSqlQuery *q;
|
RDSqlQuery *q;
|
||||||
unsigned char rawstr[1024];
|
QString name;
|
||||||
unsigned char sha1[SHA_DIGEST_LENGTH];
|
QString passwd;
|
||||||
|
|
||||||
//
|
//
|
||||||
// First, attempt ticket authentication
|
// First, attempt ticket authentication
|
||||||
@ -322,6 +319,7 @@ bool Xport::Authenticate()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if((xport_post->clientAddress().toIPv4Address()>>24)==127) { // Localhost
|
if((xport_post->clientAddress().toIPv4Address()>>24)==127) { // Localhost
|
||||||
|
TryCreateTicket(name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
sql=QString("select NAME from STATIONS where ")+
|
sql=QString("select NAME from STATIONS where ")+
|
||||||
@ -329,6 +327,7 @@ bool Xport::Authenticate()
|
|||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
if(q->first()) {
|
if(q->first()) {
|
||||||
delete q;
|
delete q;
|
||||||
|
TryCreateTicket(name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
delete q;
|
delete q;
|
||||||
@ -339,6 +338,21 @@ bool Xport::Authenticate()
|
|||||||
if(!xport_user->checkPassword(passwd,false)) {
|
if(!xport_user->checkPassword(passwd,false)) {
|
||||||
return 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(xport_post->getValue("COMMAND",&command)) {
|
||||||
if(command==RDXPORT_COMMAND_CREATETICKET) {
|
if(command==RDXPORT_COMMAND_CREATETICKET) {
|
||||||
@ -371,8 +385,6 @@ bool Xport::Authenticate()
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ class Xport : public QObject
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool Authenticate();
|
bool Authenticate();
|
||||||
|
void TryCreateTicket(const QString &name);
|
||||||
void Export();
|
void Export();
|
||||||
void Import();
|
void Import();
|
||||||
void DeleteAudio();
|
void DeleteAudio();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user