1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-23 06:35:36 +00:00

Compare commits

..

19 Commits

Author SHA1 Message Date
Ailin Nemui
2f2fa029f9 up abi 2024-04-01 16:37:35 +02:00
Ailin Nemui
08bb648850 proper sasl mechanism variable initialisation 2024-04-01 16:33:57 +02:00
Ailin Nemui
98b391f62e minor cleanup 2024-04-01 16:33:36 +02:00
Patrick Okraku
f2b97631e1 Added support for SCRAM-SHA-1, SCRAM-SHA-256 and SCRAM-SHA-512 2024-04-01 15:12:01 +02:00
ailin-nemui
91dac0e5a1
Merge pull request #1512 from ailin-nemui/shquote
missing shell quotes
2024-03-31 16:53:57 +00:00
ailin-nemui
aebc0667a6
Merge pull request #1515 from maflcko/patch-1
Update server.c: Add missing include
2024-03-31 16:53:44 +00:00
maflcko
cf6615a70e
Update server.c: Add missing include 2024-03-28 19:33:24 +01:00
Ailin Nemui
4dd57cf24e missing shell quotes 2024-02-23 17:04:41 +01:00
ailin-nemui
b3f6ed0b11
Merge pull request #1511 from soliton-/patch-1
typo fixes
2024-02-01 21:24:30 +00:00
Gunter Labes
41f8213fe0
typo fixes 2024-02-01 21:56:20 +01:00
ailin-nemui
504fd7bc60
Merge pull request #1510 from ailin-nemui/perl-again
restore locale if perl breaks it
2024-01-27 17:42:42 +00:00
Ailin Nemui
a0caf5e5e6 restore locale if perl breaks it 2023-12-22 15:06:23 +01:00
Ailin Nemui
514f1cdcf6 Revert "Merge pull request #1498 from ailin-nemui/perl5380locale"
This reverts commit 48bc90eb17, reversing
changes made to 2a1291f26f.
2023-12-22 15:06:23 +01:00
ailin-nemui
2f16b554b5
Merge pull request #1509 from ailin-nemui/compile-deps
explicitly list pkg-config as build dependency
2023-12-19 12:53:20 +00:00
Ailin Nemui
a11df816b7 explicitly list pkg-config as build dependency, since meson needs it to find glib 2023-12-19 13:51:46 +01:00
ailin-nemui
89adcc4ee8
Merge pull request #1505 from irssi/vague666-patch-1
Update bind.in
2023-11-11 13:55:37 +00:00
Jari Matilainen
ed2825f28b
Update bind.in
Better explanation for upper-/lowercase usage for keys
2023-11-11 02:13:34 +01:00
ailin-nemui
363fbf048f
Merge pull request #1502 from irssi/ailin-nemui/window-default-help
Add SET window_default_ to See also in window help
2023-10-31 10:00:46 +00:00
ailin-nemui
ea434591f4
Add SET window_default_ to See also in window help 2023-10-31 10:58:14 +01:00
14 changed files with 52 additions and 26 deletions

View File

@ -5,6 +5,7 @@
To compile Irssi you need:
- meson-0.53 build system with ninja-1.8 or greater
- pkg-config (or compatible)
- glib-2.32 or greater
- openssl (for ssl support)
- perl-5.8 or greater (for building, and optionally Perl scripts)

View File

@ -17,13 +17,15 @@ Details:
Adds or removes a binding; the binding itself is case-sensitive and may
contain as many characters as you want.
Uppercase characters usually indicate that you need to keep the shift-key
pressed to use the binding.
Key bindings are case sensitive so uppercase letters mean you also have
to use the shift key, except for ctrl which does not support shift but
the keys must always be typed in uppercase.
%9Examples:%9
/BIND
/BIND meta-c /CLEAR
/BIND meta-C /CYCLE
/BIND meta-q change_window 16
/BIND -delete meta-y
/BIND ^W^C /WINDOW NEW HIDE

View File

@ -36,7 +36,8 @@
-cmdmax: Specifies the maximum number of commands to perform before
starting the internal flood protection.
-sasl_mechanism Specifies the mechanism to use for the SASL authentication.
Irssi supports: PLAIN, EXTERNAL, SCRAM-SHA-1, SCRAM-SHA-256 and SCRAM-SHA-512
Irssi supports: PLAIN, EXTERNAL, SCRAM-SHA-1, SCRAM-SHA-256
and SCRAM-SHA-512
Use '' to disable the authentication.
-sasl_username Specifies the username to use during the SASL authentication.
-sasl_password Specifies the password to use during the SASL authentication.

View File

@ -20,10 +20,10 @@
%9Description:%9
Manipulate the text in the window to go to a to the given line number, or
Manipulate the text in the window to go to the given line number, or
clear the buffers.
The timestamp format is format is '[dd[.mm] | -<days ago>] hh:mi[:ss]'.
The timestamp format is '[dd[.mm] | -<days ago>] hh:mi[:ss]'.
%9Examples:%9

View File

@ -74,5 +74,5 @@
/WINDOW HIDELEVEL ^JOINS ^PARTS ^QUITS
/WINDOW LOGFILE ~/logs/notices.log
%9See also:%9 JOIN, LEVELS, LOG, QUERY
%9See also:%9 JOIN, LEVELS, LOG, QUERY, SET window_default_level, SET window_default_hidelevel

View File

@ -6,7 +6,7 @@
#define IRSSI_GLOBAL_CONFIG "irssi.conf" /* config file name in /etc/ */
#define IRSSI_HOME_CONFIG "config" /* config file name in ~/.irssi/ */
#define IRSSI_ABI_VERSION 52
#define IRSSI_ABI_VERSION 53
#define DEFAULT_SERVER_ADD_PORT 6667
#define DEFAULT_SERVER_ADD_TLS_PORT 6697

View File

@ -30,6 +30,7 @@
#include <irssi/src/core/misc.h>
#include <irssi/src/core/servers-setup.h>
#include <irssi/src/core/rawlog.h>
#include <irssi/src/core/network-openssl.h>
#include <irssi/src/core/net-sendbuffer.h>
#include <stddef.h>

View File

@ -148,8 +148,11 @@ static void sig_server_setup_fill_chatnet(IRC_SERVER_CONNECT_REC *conn,
"missing or empty");
} else if (!g_ascii_strcasecmp(ircnet->sasl_mechanism, "external")) {
conn->sasl_mechanism = SASL_MECHANISM_EXTERNAL;
} else
g_warning("Unsupported SASL mechanism \"%s\" selected", ircnet->sasl_mechanism);
} else {
g_warning("Unsupported SASL mechanism \"%s\" selected",
ircnet->sasl_mechanism);
conn->sasl_mechanism = SASL_MECHANISM_MAX;
}
}
}

View File

@ -475,6 +475,7 @@ SERVER_REC *irc_server_init_connect(SERVER_CONNECT_REC *conn)
server->send_message = send_message;
server->query_find_func = (QUERY_REC * (*) (SERVER_REC *, const char *) ) irc_query_find;
server->nick_comp_func = irc_nickcmp_rfc1459;
server->sasl_success = FALSE;
server_connect_init((SERVER_REC *) server);
return (SERVER_REC *) server;

View File

@ -92,6 +92,12 @@ static void sasl_start(IRC_SERVER_REC *server, const char *data, const char *fro
case SASL_MECHANISM_SCRAM_SHA_512:
irc_send_cmd_now(server, "AUTHENTICATE SCRAM-SHA-512");
break;
case SASL_MECHANISM_MAX:
signal_emit("server sasl failure", 2, server,
"Irssi: Unsupported SASL mechanism");
irc_cap_finish_negotiation(server);
return;
}
server->sasl_timeout = g_timeout_add(SASL_TIMEOUT, (GSourceFunc) sasl_timeout, server);
}
@ -250,7 +256,7 @@ static void scram_authenticate(IRC_SERVER_REC *server, const char *data, const c
scram_session_create(digest, conn->sasl_username, conn->sasl_password);
if (conn->scram_session == NULL) {
g_error("Could not create SCRAM session with digest %s", digest);
g_critical("Could not create SCRAM session with digest %s", digest);
irc_send_cmd_now(server, "AUTHENTICATE *");
return;
}
@ -260,13 +266,13 @@ static void scram_authenticate(IRC_SERVER_REC *server, const char *data, const c
if (ret == SCRAM_IN_PROGRESS) {
// Authentication is still in progress
GString *resp = g_string_new(output);
GString *resp = g_string_new_len(output, output_len);
sasl_send_response(server, resp);
g_string_free(resp, TRUE);
g_free(output);
} else if (ret == SCRAM_SUCCESS) {
// Authentication succeeded
irc_send_cmd_now(server, "AUTHENTICATE +");
sasl_send_response(server, NULL);
scram_session_free(conn->scram_session);
conn->scram_session = NULL;
} else if (ret == SCRAM_ERROR) {

View File

@ -137,7 +137,8 @@ static scram_status process_server_first(SCRAM_SESSION_REC *session, const char
param_count = g_strv_length(params);
if (param_count < 3) {
session->error = g_strdup_printf("Invalid server-first-message: %s", data);
/* Invalid server-first-message */
session->error = g_strdup_printf("%s", data);
g_strfreev(params);
return SCRAM_ERROR;
}
@ -300,4 +301,4 @@ scram_status scram_process(SCRAM_SESSION_REC *session, const char *input, char *
}
return status;
}
}

View File

@ -50,10 +50,3 @@ sub eval_file {
die "cap_sasl has been unloaded from Irssi ".Irssi::version()." because it conflicts with the built-in SASL support. See /help network for configuring SASL or read the ChangeLog for more information.";
}
}
if ( $] >= 5.037005 && $] <= 5.038000 ) {
# https://github.com/Perl/perl5/issues/21366
print STDERR "\e7 \e[A Irssi: applying locale workaround for Perl 5.38.0 \e8";
require POSIX;
POSIX::setlocale(&POSIX::LC_ALL, "");
}

View File

@ -90,24 +90,41 @@ static void xs_init(pTHX)
void perl_scripts_init(void)
{
char *code, *use_code;
int broken_perl;
perl_scripts = NULL;
perl_sources_start();
perl_signals_start();
my_perl = perl_alloc();
broken_perl = wcwidth(160);
perl_construct(my_perl);
broken_perl = broken_perl != wcwidth(160);
perl_parse(my_perl, xs_init, G_N_ELEMENTS(perl_args)-1, perl_args, NULL);
perl_parse(my_perl, xs_init, G_N_ELEMENTS(perl_args) - 1, perl_args, NULL);
perl_common_start();
perl_common_start();
use_code = perl_get_use_list();
code = g_strdup_printf(irssi_core_code, use_code);
perl_eval_pv(code, TRUE);
if (broken_perl) {
g_warning("applying locale workaround for Perl %d.%d, see "
"https://github.com/Perl/perl5/issues/21366",
PERL_REVISION, PERL_VERSION);
perl_eval_pv("package Irssi::Core;"
/* https://github.com/Perl/perl5/issues/21746 */
"if ( $] == $] )"
"{"
"require POSIX;"
"POSIX::setlocale(&POSIX::LC_ALL, \"\");"
"}"
"1;",
TRUE);
}
g_free(code);
g_free(use_code);
g_free(use_code);
}
/* Destroy all perl scripts and deinitialize perl interpreter */
@ -441,7 +458,7 @@ void perl_core_init(void)
char **argv = perl_args;
PERL_SYS_INIT3(&argc, &argv, &environ);
print_script_errors = 1;
print_script_errors = 1;
settings_add_str("perl", "perl_use_lib", PERL_USE_LIB);
/*PL_perl_destruct_level = 1; - this crashes with some people.. */

View File

@ -1,6 +1,6 @@
#!/bin/sh
DATE=`grep '^v' $1/NEWS | head -1`
DATE=`grep '^v' "$1"/NEWS | head -1`
VERSION_DATE=`echo "$DATE" | cut -f 2 -d ' ' | tr -d -`
case $VERSION_DATE in
*xx)