mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
parent
1c21031d5e
commit
be3d310c56
@ -3448,7 +3448,7 @@ _cmd_xa(gchar **args, struct cmd_help_t help)
|
|||||||
|
|
||||||
static char *
|
static char *
|
||||||
_ask_password(void) {
|
_ask_password(void) {
|
||||||
char *passwd = malloc(sizeof(char) * 21);
|
char *passwd = malloc(sizeof(char) * (MAX_PASSWORD_SIZE + 1));
|
||||||
status_bar_get_password();
|
status_bar_get_password();
|
||||||
status_bar_refresh();
|
status_bar_refresh();
|
||||||
inp_block();
|
inp_block();
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
#ifndef ACCOUNTS_H
|
#ifndef ACCOUNTS_H
|
||||||
#define ACCOUNTS_H
|
#define ACCOUNTS_H
|
||||||
|
|
||||||
|
#define MAX_PASSWORD_SIZE 64
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
typedef struct prof_account_t {
|
typedef struct prof_account_t {
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include "command/command.h"
|
#include "command/command.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "config/accounts.h"
|
||||||
#include "config/preferences.h"
|
#include "config/preferences.h"
|
||||||
#include "config/theme.h"
|
#include "config/theme.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
@ -206,7 +207,7 @@ inp_get_password(char *passwd)
|
|||||||
_clear_input();
|
_clear_input();
|
||||||
_inp_win_refresh();
|
_inp_win_refresh();
|
||||||
noecho();
|
noecho();
|
||||||
mvwgetnstr(inp_win, 0, 1, passwd, 20);
|
mvwgetnstr(inp_win, 0, 1, passwd, MAX_PASSWORD_SIZE);
|
||||||
wmove(inp_win, 0, 0);
|
wmove(inp_win, 0, 0);
|
||||||
echo();
|
echo();
|
||||||
status_bar_clear();
|
status_bar_clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user