mirror of https://github.com/acanas/swad-core.git
Version 15.40.8
This commit is contained in:
parent
8c294883af
commit
45bf293418
|
@ -173,7 +173,7 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
|
|||
NewEmail);
|
||||
|
||||
/***** Password *****/
|
||||
Pwd_PutFormToGetNewPasswordTwice ();
|
||||
Pwd_PutFormToGetNewPasswordOnce ();
|
||||
|
||||
/***** Send button and form end *****/
|
||||
Lay_EndRoundFrameTableWithButton (Lay_CREATE_BUTTON,Txt_Create_account);
|
||||
|
@ -327,10 +327,9 @@ static bool Acc_GetParamsNewAccount (char *NewNicknameWithoutArroba,
|
|||
extern const char *Txt_The_nickname_entered_X_is_not_valid_;
|
||||
extern const char *Txt_The_email_address_X_had_been_registered_by_another_user;
|
||||
extern const char *Txt_The_email_address_entered_X_is_not_valid;
|
||||
extern const char *Txt_You_have_not_written_twice_the_same_new_password;
|
||||
char Query[1024];
|
||||
char NewNicknameWithArroba[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA+1];
|
||||
char NewPlainPassword[2][Pwd_MAX_LENGTH_PLAIN_PASSWORD+1];
|
||||
char NewPlainPassword[Pwd_MAX_LENGTH_PLAIN_PASSWORD+1];
|
||||
bool Error = false;
|
||||
|
||||
/***** Step 1/3: Get new nickname from form *****/
|
||||
|
@ -391,24 +390,14 @@ static bool Acc_GetParamsNewAccount (char *NewNicknameWithoutArroba,
|
|||
}
|
||||
|
||||
/***** Step 3/3: Get new password from form *****/
|
||||
Par_GetParToText ("Paswd1",NewPlainPassword[0],Pwd_MAX_LENGTH_PLAIN_PASSWORD);
|
||||
Par_GetParToText ("Paswd2",NewPlainPassword[1],Pwd_MAX_LENGTH_PLAIN_PASSWORD);
|
||||
if (strcmp (NewPlainPassword[0],NewPlainPassword[1]))
|
||||
Par_GetParToText ("Paswd",NewPlainPassword,Pwd_MAX_LENGTH_PLAIN_PASSWORD);
|
||||
Str_ChangeFormat (Str_FROM_FORM,Str_TO_TEXT,
|
||||
NewPlainPassword,Pwd_MAX_LENGTH_PLAIN_PASSWORD,true);
|
||||
Cry_EncryptSHA512Base64 (NewPlainPassword,NewEncryptedPassword);
|
||||
if (!Pwd_SlowCheckIfPasswordIsGood (NewPlainPassword,NewEncryptedPassword,-1L)) // New password is good?
|
||||
{
|
||||
// Passwords don't match
|
||||
Error = true;
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_have_not_written_twice_the_same_new_password);
|
||||
}
|
||||
else
|
||||
{
|
||||
Str_ChangeFormat (Str_FROM_FORM,Str_TO_TEXT,
|
||||
NewPlainPassword[0],Pwd_MAX_LENGTH_PLAIN_PASSWORD,true);
|
||||
Cry_EncryptSHA512Base64 (NewPlainPassword[0],NewEncryptedPassword);
|
||||
if (!Pwd_SlowCheckIfPasswordIsGood (NewPlainPassword[0],NewEncryptedPassword,-1L)) // New password is good?
|
||||
{
|
||||
Error = true;
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message); // Error message is set in Usr_SlowCheckIfPasswordIsGood
|
||||
}
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message); // Error message is set in Usr_SlowCheckIfPasswordIsGood
|
||||
}
|
||||
|
||||
return !Error;
|
||||
|
|
|
@ -111,11 +111,12 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.40.7 (2015/11/20)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.40.8 (2015/11/20)"
|
||||
|
||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||
/*
|
||||
Version 15.40.8: Nov 20, 2015 Password is requested only one time when creating a new account. (187309 lines)
|
||||
Version 15.40.7: Nov 20, 2015 New help button to register students in courses without them. (187319 lines)
|
||||
Version 15.40.6: Nov 20, 2015 New button to register students in courses without them.
|
||||
New buttons to create institution, centre, degree and course. (187285 lines)
|
||||
|
|
|
@ -2819,8 +2819,8 @@ static void Msg_WriteSentOrReceivedMsgSubject (Msg_TypeOfMessages_t TypeOfMessag
|
|||
Msg_PutHiddenParamMsgCod (MsgCod);
|
||||
Act_LinkFormSubmit (Expanded ? Txt_Hide_message :
|
||||
Txt_See_message,
|
||||
Open ? "MSG_TIT_BG" :
|
||||
"MSG_TIT_BG_NEW");
|
||||
Open ? "MSG_TIT" :
|
||||
"MSG_TIT_NEW");
|
||||
|
||||
/***** Write subject *****/
|
||||
if (Subject[0])
|
||||
|
|
|
@ -720,6 +720,32 @@ void Pwd_ShowFormChgPwd (void)
|
|||
Act_FormEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Put form to request the new password once ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pwd_PutFormToGetNewPasswordOnce (void)
|
||||
{
|
||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||
extern const char *Txt_Password;
|
||||
extern const char *Txt_HELP_password;
|
||||
|
||||
sprintf (Gbl.Message,Txt_HELP_password,Pwd_MIN_LENGTH_PLAIN_PASSWORD);
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s: "
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"password\" name=\"Paswd\""
|
||||
" size=\"25\" maxlength=\"%u\" placeholder=\"%s\" />"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Password,
|
||||
Pwd_MAX_LENGTH_PLAIN_PASSWORD,
|
||||
Gbl.Message);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Put form to request the new password twice *****************/
|
||||
/*****************************************************************************/
|
||||
|
@ -728,10 +754,8 @@ void Pwd_PutFormToGetNewPasswordTwice (void)
|
|||
{
|
||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||
extern const char *Txt_New_password;
|
||||
extern const char *Txt_Password;
|
||||
extern const char *Txt_HELP_password;
|
||||
extern const char *Txt_Retype_new_password;
|
||||
extern const char *Txt_Retype_password;
|
||||
|
||||
sprintf (Gbl.Message,Txt_HELP_password,Pwd_MIN_LENGTH_PLAIN_PASSWORD);
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
|
@ -753,13 +777,11 @@ void Pwd_PutFormToGetNewPasswordTwice (void)
|
|||
"</td>"
|
||||
"</tr>",
|
||||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Gbl.Usrs.Me.Logged? Txt_New_password : // Changing my password
|
||||
Txt_Password, // Creating new account
|
||||
Txt_New_password,
|
||||
Pwd_MAX_LENGTH_PLAIN_PASSWORD,
|
||||
Gbl.Message,
|
||||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Gbl.Usrs.Me.Logged ? Txt_Retype_new_password : // Changing my password
|
||||
Txt_Retype_password, // Creating new account
|
||||
Txt_Retype_new_password,
|
||||
Pwd_MAX_LENGTH_PLAIN_PASSWORD,
|
||||
Gbl.Message);
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ bool Pwd_SlowCheckIfPasswordIsGood (const char *PlainPassword,
|
|||
bool Pwd_FastCheckIfPasswordSeemsGood (const char *PlainPassword);
|
||||
|
||||
void Pwd_ShowFormChgPwd (void);
|
||||
void Pwd_PutFormToGetNewPasswordOnce (void);
|
||||
void Pwd_PutFormToGetNewPasswordTwice (void);
|
||||
void Pwd_ShowFormOthPwd (void);
|
||||
|
||||
|
|
21
swad_text.c
21
swad_text.c
|
@ -29542,27 +29542,6 @@ const char *Txt_Retype_new_password =
|
|||
"Redigite a nova senha";
|
||||
#endif
|
||||
|
||||
const char *Txt_Retype_password =
|
||||
#if L==0
|
||||
"Reescriviu la contrasenya";
|
||||
#elif L==1
|
||||
"Wiederholung Passwort";
|
||||
#elif L==2
|
||||
"Retype password";
|
||||
#elif L==3
|
||||
"Reescriba la contraseña";
|
||||
#elif L==4
|
||||
"Confirmez votre mot de passe";
|
||||
#elif L==5
|
||||
"Reescriba la contraseña"; // Okoteve traducción
|
||||
#elif L==6
|
||||
"Riscrivi la password";
|
||||
#elif L==7
|
||||
"Powtórz hasło";
|
||||
#elif L==8
|
||||
"Redigite a senha";
|
||||
#endif
|
||||
|
||||
const char *Txt_Role =
|
||||
#if L==0
|
||||
"Rol";
|
||||
|
|
Loading…
Reference in New Issue