diff -Nru kgb-bot-1.53/Changes kgb-bot-1.54/Changes --- kgb-bot-1.53/Changes 2018-10-13 19:19:23.000000000 +0000 +++ kgb-bot-1.54/Changes 2019-01-03 10:21:31.000000000 +0000 @@ -1,4 +1,18 @@ -1.53 (2018-10-2) +1.54 (2019-01-03) + [ Damyan Ivanov ] + * comment out the test client config example of message-template + * use_ssl: 0 in the example test server configs + + [ gregor herrmann ] + * script/kgb-bot: use $client_ip->ip in webhook error message + like in the debug message. + Thanks to James Clarke for the suggestion. + + [ Damyan Ivanov ] + * kgb-bot: convert ::ffff:a.b.c.d to a.b.c.d before looking up client ip in + the white list + +1.53 (2018-10-13) [ Damyan Ivanov ] * drop port: option from default config * add port to the test server IRC config now that 6697 us the default diff -Nru kgb-bot-1.53/debian/changelog kgb-bot-1.54/debian/changelog --- kgb-bot-1.53/debian/changelog 2018-10-13 19:25:32.000000000 +0000 +++ kgb-bot-1.54/debian/changelog 2019-01-03 10:23:40.000000000 +0000 @@ -1,3 +1,25 @@ +kgb-bot (1.54-1) unstable; urgency=medium + + [ Damyan Ivanov ] + * comment out the test client config example of message-template + seeing the defaults is more usable + * use_ssl: 0 in the example test server configs + there's still a bug when use_ssl is 1 (the default) and the port is 6667 + + [ gregor herrmann ] + * script/kgb-bot: use $client_ip->ip in webhook error message + like in the debug message. + Thanks to James Clarke for the suggestion. + + [ Damyan Ivanov ] + * kgb-bot: convert ::ffff:a.b.c.d to a.b.c.d before looking up client ip in + the white list + fixes ipv4 white-list configuration + * bump years of copyright + * Declare conformance with Policy 4.3.0 (no chanes needed) + + -- Damyan Ivanov Thu, 03 Jan 2019 10:23:40 +0000 + kgb-bot (1.53-1) unstable; urgency=medium [ Damyan Ivanov ] diff -Nru kgb-bot-1.53/debian/control kgb-bot-1.54/debian/control --- kgb-bot-1.53/debian/control 2018-10-13 19:22:33.000000000 +0000 +++ kgb-bot-1.54/debian/control 2019-01-03 10:23:40.000000000 +0000 @@ -37,7 +37,7 @@ git, subversion, locales-all -Standards-Version: 4.2.1 +Standards-Version: 4.3.0 Vcs-Browser: https://salsa.debian.org/kgb-team/kgb/ Vcs-Git: https://salsa.debian.org/kgb-team/kgb.git Homepage: https://salsa.debian.org/kgb-team/kgb/wikis/home diff -Nru kgb-bot-1.53/debian/copyright kgb-bot-1.54/debian/copyright --- kgb-bot-1.53/debian/copyright 2018-04-10 15:43:57.000000000 +0000 +++ kgb-bot-1.54/debian/copyright 2019-01-03 10:19:58.000000000 +0000 @@ -6,7 +6,7 @@ Files: * Copyright: 2008-2013, Martín Ferrari - 2008-2018, Damyan Ivanov + 2008-2019, Damyan Ivanov 2010-2016, gregor herrmann 2018, James Clarke 2018, Colin Finck diff -Nru kgb-bot-1.53/eg/test-client.conf kgb-bot-1.54/eg/test-client.conf --- kgb-bot-1.53/eg/test-client.conf 2018-10-13 19:19:23.000000000 +0000 +++ kgb-bot-1.54/eg/test-client.conf 2019-01-03 10:21:31.000000000 +0000 @@ -23,7 +23,7 @@ # Examples: # # single-line notifications -message-template: "${{author-name} }${({author-login})}${ {branch}}${ {commit}}${ {project}/}${{module}}${ {changes}}${ {log-first-line}}${ * {web-link}}" +#message-template: "${{author-name} }${({author-login})}${ {branch}}${ {commit}}${ {project}/}${{module}}${ {changes}}${ {log-first-line}}${ * {web-link}}" # multi-line notifications #message-template: "${{author-name} }${({author-login})}${ {branch}}${ {commit}}${ {project}/}${{module}}${ {changes}}${ * {web-link}}${\n{log}}" diff -Nru kgb-bot-1.53/eg/test-server-1.conf.d/repos.conf kgb-bot-1.54/eg/test-server-1.conf.d/repos.conf --- kgb-bot-1.53/eg/test-server-1.conf.d/repos.conf 2018-10-13 19:19:23.000000000 +0000 +++ kgb-bot-1.54/eg/test-server-1.conf.d/repos.conf 2019-01-03 10:21:31.000000000 +0000 @@ -10,6 +10,7 @@ nick: KGB server: localhost port: 6667 + use_ssl: 0 flood: 1 channels: - name: '#test' diff -Nru kgb-bot-1.53/eg/test-server-2.conf kgb-bot-1.54/eg/test-server-2.conf --- kgb-bot-1.53/eg/test-server-2.conf 2018-10-13 19:19:23.000000000 +0000 +++ kgb-bot-1.54/eg/test-server-2.conf 2019-01-03 10:21:31.000000000 +0000 @@ -22,6 +22,7 @@ nick: KGB-1 server: localhost port: 6667 + use_ssl: 0 flood: 1 channels: - name: '#test' diff -Nru kgb-bot-1.53/lib/App/KGB.pm kgb-bot-1.54/lib/App/KGB.pm --- kgb-bot-1.53/lib/App/KGB.pm 2018-10-13 19:19:23.000000000 +0000 +++ kgb-bot-1.54/lib/App/KGB.pm 2019-01-03 10:21:31.000000000 +0000 @@ -31,7 +31,7 @@ =cut -our $VERSION = '1.53'; +our $VERSION = '1.54'; =head1 DESCRIPTION diff -Nru kgb-bot-1.53/LICENSE kgb-bot-1.54/LICENSE --- kgb-bot-1.53/LICENSE 2018-10-13 19:19:23.000000000 +0000 +++ kgb-bot-1.54/LICENSE 2019-01-03 10:21:31.000000000 +0000 @@ -1,4 +1,4 @@ -This software is Copyright (c) 2018 by Martín Ferrari & Damyan Ivanov & gregor herrmann. +This software is Copyright (c) 2019 by Martín Ferrari & Damyan Ivanov & gregor herrmann. This is free software, licensed under: diff -Nru kgb-bot-1.53/META.json kgb-bot-1.54/META.json --- kgb-bot-1.53/META.json 2018-10-13 19:19:23.000000000 +0000 +++ kgb-bot-1.54/META.json 2019-01-03 10:21:31.000000000 +0000 @@ -82,6 +82,6 @@ "http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt" ] }, - "version" : "1.53", - "x_serialization_backend" : "JSON::PP version 2.97001" + "version" : "1.54", + "x_serialization_backend" : "JSON::PP version 4.00" } diff -Nru kgb-bot-1.53/META.yml kgb-bot-1.54/META.yml --- kgb-bot-1.53/META.yml 2018-10-13 19:19:23.000000000 +0000 +++ kgb-bot-1.54/META.yml 2019-01-03 10:21:31.000000000 +0000 @@ -61,5 +61,5 @@ perl: '5.010' resources: license: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt -version: '1.53' +version: '1.54' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -Nru kgb-bot-1.53/script/kgb-bot kgb-bot-1.54/script/kgb-bot --- kgb-bot-1.53/script/kgb-bot 2018-10-13 19:19:23.000000000 +0000 +++ kgb-bot-1.54/script/kgb-bot 2019-01-03 10:21:31.000000000 +0000 @@ -5,7 +5,7 @@ # # KGB - an IRC bot helping collaboration # Copyright © 2008 Martín Ferrari -# Copyright © 2008,2009,2010,2011,2012,2013,2018 Damyan Ivanov +# Copyright © 2008,2009,2010,2011,2012,2013,2018,2019 Damyan Ivanov # Copyright © 2010 gregor herrmann # Copyright © 2018 James Clarke # @@ -1584,7 +1584,10 @@ HTTP::Status::HTTP_PRECONDITION_FAILED); } - my $client_ip = Net::IP->new($response->connection->remote_ip); + my $client_ip = $response->connection->remote_ip; + # fix ipv4-as-ipv6 represenation + $client_ip =~ s/^::ffff:(\d+\.\d+\.\d+\.\d+)$/$1/; + $client_ip = Net::IP->new($client_ip); my $allowed = 0; @@ -1599,7 +1602,7 @@ } unless ($allowed) { - return webhook_error(@_, "Client IP $client_ip is not whitelisted", + return webhook_error(@_, 'Client IP ' . $client_ip->ip . ' is not whitelisted', HTTP::Status::HTTP_FORBIDDEN); }