mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-19 06:32:34 +02:00
2020-11-29 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdadmin(1) that caused new passwords to be truncated to 16 characters. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
af72f71f97
commit
93d9ab14f7
@ -20648,3 +20648,6 @@
|
||||
2020-11-24 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Documented user-facing changes to the 'Rivendell Group List' and
|
||||
'Group' dialogs in rdadmin(1) in the Operations Guide.
|
||||
2020-11-29 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in rdadmin(1) that caused new passwords to be
|
||||
truncated to 16 characters.
|
||||
|
5
lib/rd.h
5
lib/rd.h
@ -70,6 +70,11 @@
|
||||
#define DEFAULT_MYSQL_CHARSET "utf8mb4"
|
||||
#define DEFAULT_MYSQL_COLLATION "utf8mb4_general_ci"
|
||||
|
||||
/*
|
||||
* Maximum Length of Rivendell User Passwords
|
||||
*/
|
||||
#define RD_MAX_PASSWORD_LENGTH 32
|
||||
|
||||
/*
|
||||
* ALSA Settings
|
||||
*/
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Set Password widget for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -18,8 +18,7 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <qpushbutton.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "rdpasswd.h"
|
||||
#include "rdtextvalidator.h"
|
||||
@ -41,53 +40,47 @@ RDPasswd::RDPasswd(QString *password,QWidget *parent)
|
||||
//
|
||||
RDTextValidator *validator=new RDTextValidator(this);
|
||||
|
||||
//
|
||||
// OK Button
|
||||
//
|
||||
QPushButton *ok_button=new QPushButton(this);
|
||||
ok_button->setGeometry(10,60,100,55);
|
||||
ok_button->setFont(buttonFont());
|
||||
ok_button->setText(tr("&OK"));
|
||||
ok_button->setDefault(true);
|
||||
connect(ok_button,SIGNAL(clicked()),this,SLOT(okData()));
|
||||
|
||||
//
|
||||
// Cancel Button
|
||||
//
|
||||
QPushButton *cancel_button=new QPushButton(this);
|
||||
cancel_button->setGeometry(120,60,100,55);
|
||||
cancel_button->setFont(buttonFont());
|
||||
cancel_button->setText(tr("&Cancel"));
|
||||
connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData()));
|
||||
|
||||
//
|
||||
// Password
|
||||
//
|
||||
passwd_password_1_edit=new QLineEdit(this);
|
||||
passwd_password_1_edit->setGeometry(90,11,100,19);
|
||||
passwd_password_1_edit->setMaxLength(16);
|
||||
passwd_password_1_edit->setMaxLength(RD_MAX_PASSWORD_LENGTH);
|
||||
passwd_password_1_edit->setEchoMode(QLineEdit::Password);
|
||||
passwd_password_1_edit->setFocus();
|
||||
passwd_password_1_edit->setValidator(validator);
|
||||
QLabel *passwd_password_1_label=
|
||||
passwd_password_1_label=
|
||||
new QLabel(passwd_password_1_edit,tr("&Password:"),this);
|
||||
passwd_password_1_label->setFont(labelFont());
|
||||
passwd_password_1_label->setGeometry(10,13,75,19);
|
||||
passwd_password_1_label->setAlignment(Qt::AlignRight|Qt::TextShowMnemonic);
|
||||
|
||||
//
|
||||
// Confirm Password
|
||||
//
|
||||
passwd_password_2_edit=new QLineEdit(this);
|
||||
passwd_password_2_edit->setGeometry(90,32,100,19);
|
||||
passwd_password_2_edit->setMaxLength(16);
|
||||
passwd_password_2_edit->setMaxLength(RD_MAX_PASSWORD_LENGTH);
|
||||
passwd_password_2_edit->setEchoMode(QLineEdit::Password);
|
||||
passwd_password_2_edit->setValidator(validator);
|
||||
QLabel *passwd_password_2_label=
|
||||
passwd_password_2_label=
|
||||
new QLabel(passwd_password_2_edit,tr("C&onfirm:"),this);
|
||||
passwd_password_2_label->setFont(labelFont());
|
||||
passwd_password_2_label->setGeometry(10,34,75,19);
|
||||
passwd_password_2_label->setAlignment(Qt::AlignRight|Qt::TextShowMnemonic);
|
||||
|
||||
//
|
||||
// OK Button
|
||||
//
|
||||
passwd_ok_button=new QPushButton(this);
|
||||
passwd_ok_button->setFont(buttonFont());
|
||||
passwd_ok_button->setText(tr("&OK"));
|
||||
passwd_ok_button->setDefault(true);
|
||||
connect(passwd_ok_button,SIGNAL(clicked()),this,SLOT(okData()));
|
||||
|
||||
//
|
||||
// Cancel Button
|
||||
//
|
||||
passwd_cancel_button=new QPushButton(this);
|
||||
passwd_cancel_button->setFont(buttonFont());
|
||||
passwd_cancel_button->setText(tr("&Cancel"));
|
||||
connect(passwd_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData()));
|
||||
}
|
||||
|
||||
|
||||
@ -100,7 +93,7 @@ RDPasswd::~RDPasswd()
|
||||
|
||||
QSize RDPasswd::sizeHint() const
|
||||
{
|
||||
return QSize(230,125);
|
||||
return QSize(450,125);
|
||||
}
|
||||
|
||||
|
||||
@ -128,3 +121,19 @@ void RDPasswd::cancelData()
|
||||
{
|
||||
done(1);
|
||||
}
|
||||
|
||||
|
||||
void RDPasswd::resizeEvent(QResizeEvent *e)
|
||||
{
|
||||
int w=size().width();
|
||||
int h=size().height();
|
||||
|
||||
passwd_password_1_label->setGeometry(10,13,75,19);
|
||||
passwd_password_1_edit->setGeometry(90,11,w-100,19);
|
||||
|
||||
passwd_password_2_label->setGeometry(10,34,75,19);
|
||||
passwd_password_2_edit->setGeometry(90,32,w-100,19);
|
||||
|
||||
passwd_ok_button->setGeometry(w-180,h-60,80,50);
|
||||
passwd_cancel_button->setGeometry(w-90,h-60,80,50);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Set Password Widget for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -21,31 +21,37 @@
|
||||
#ifndef RDPASSWD_H
|
||||
#define RDPASSWD_H
|
||||
|
||||
#include <qlineedit.h>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
|
||||
#include <rddialog.h>
|
||||
|
||||
class RDPasswd : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RDPasswd(QString *password,QWidget *parent=0);
|
||||
~RDPasswd();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
public:
|
||||
RDPasswd(QString *password,QWidget *parent=0);
|
||||
~RDPasswd();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
protected:
|
||||
private slots:
|
||||
void okData();
|
||||
void cancelData();
|
||||
|
||||
private slots:
|
||||
void okData();
|
||||
void cancelData();
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
|
||||
private:
|
||||
QLineEdit *passwd_password_1_edit;
|
||||
QLineEdit *passwd_password_2_edit;
|
||||
QString *passwd_password;
|
||||
private:
|
||||
QLabel *passwd_password_1_label;
|
||||
QLineEdit *passwd_password_1_edit;
|
||||
QLabel *passwd_password_2_label;
|
||||
QLineEdit *passwd_password_2_edit;
|
||||
QString *passwd_password;
|
||||
QPushButton *passwd_ok_button;
|
||||
QPushButton *passwd_cancel_button;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif // RDPASSWD_H
|
||||
|
@ -73,7 +73,7 @@ Login::Login(QString *username,QString *password,QWidget *parent)
|
||||
//
|
||||
login_name_edit=new QLineEdit(this);
|
||||
login_name_edit->setGeometry(100,10,100,19);
|
||||
login_name_edit->setMaxLength(16);
|
||||
login_name_edit->setMaxLength(RD_MAX_PASSWORD_LENGTH);
|
||||
login_name_edit->setFocus();
|
||||
login_name_edit->setValidator(validator);
|
||||
QLabel *login_name_label=new QLabel(login_name_edit,tr("User &Name:"),this);
|
||||
|
@ -127,6 +127,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
// Password
|
||||
//
|
||||
login_password_edit=new QLineEdit(this);
|
||||
login_password_edit->setMaxLength(RD_MAX_PASSWORD_LENGTH);
|
||||
login_password_edit->setEchoMode(QLineEdit::Password);
|
||||
login_password_label=new QLabel(login_password_edit,tr("&Password:"),this);
|
||||
login_password_label->setFont(labelFont());
|
||||
|
Loading…
x
Reference in New Issue
Block a user