Shivaram Lingamneni
40bd298a91
fix the reopened #1844
2022-01-02 01:07:37 -05:00
Shivaram Lingamneni
ed75533cb1
optionally protect against multiple starts with flock ( #1873 )
...
* optionally protect against multiple starts with flock
Fixes #1823
* use traditional .lock extension
* move config key to top level
2022-01-01 18:56:40 -05:00
Shivaram Lingamneni
a57bf46e6a
small refactor
2021-12-30 12:59:14 -05:00
William Rehwinkel
b929691470
Fix #1883 Nickserv gives error when user attempt to change password to *
2021-12-30 12:15:30 -05:00
Shivaram Lingamneni
24ad24562e
update help entry for CHATHISTORY
2021-12-29 12:45:29 -05:00
Shivaram Lingamneni
e15c355f18
fix #1876
...
INVITE did not exempt from +b unless the channel was coincidentally also +i.
This was a regression introduced in v2.4.0.
2021-12-19 18:30:18 -05:00
Shivaram Lingamneni
76f7748c8a
correctly account for nickname in CAP LS arithmetic
...
The arithmetic was assuming that the nickname is * (which it is
pre-registration). However, we were sending the actual nickname
post-registration. It would be simpler to always send *, but it
appears that the nickname is actually required by the spec:
>Replies from the server must [sic] contain the client identifier name or
>asterisk if one is not yet available.
2021-12-16 01:59:36 -05:00
Shivaram Lingamneni
ec4fb90d2b
+I should allow unregistered users to join a +R channel
...
See #1858 : this was the intent all along, but I missed this issue.
2021-12-15 22:52:11 -05:00
Shivaram Lingamneni
98e87f6cc0
explicitly close the DB during importdb
...
There is no change in behavior since committing the transaction
already write(2)'s all the data to disk. But let's comply with
the official buntdb API.
2021-12-12 22:27:05 -05:00
Shivaram Lingamneni
9293858ba1
bump database version generated by importer
...
This should have been done in 8b2f6de3e0
, since we updated both
the database schema and the importer then.
2021-12-12 22:09:42 -05:00
Shivaram Lingamneni
f3f805acb8
send *
for WHOX o (oplevel) instead of 0
...
Jobe points out that 0 is a valid oplevel in some contexts,
* is a better placeholder for "unimplemented".
2021-12-12 03:05:56 -05:00
Shivaram Lingamneni
0d0d9e72b4
Merge pull request #1861 from slingamn/issue1860_amode
...
fix #1860
2021-12-09 04:18:14 -05:00
Shivaram Lingamneni
ac17bf0e9d
Merge pull request #1857 from slingamn/dollarsign
...
disallow initial $ in nicknames
2021-12-09 04:17:57 -05:00
Shivaram Lingamneni
9d9ee11224
fix #1860
...
CS AMODE changes should take immediate effect even if the nick
does not match the account.
2021-12-08 23:47:33 -05:00
Shivaram Lingamneni
8be8f0f08d
fix #1858
...
The channel mode +R used to both prevent joins by unregistered users,
and prevent unregistered users who happened to be joined from speaking.
This changes the behavior so that +R only prevents joins:
1. This allows users who were invited or SAJOIN'ed to speak
2. To restore the old semantics, chanops can set +RM
2021-12-07 01:31:07 -05:00
Shivaram Lingamneni
f40d868cf5
disallow initial $ in nicknames
...
It collides with the massmessage mask syntax. Reported by @emersion
2021-12-06 14:17:45 -05:00
Shivaram Lingamneni
cb757c703d
change FAIL AUTHENTICATE VERIFICATION_REQUIRED to be a NOTE
...
See discussion on #1852
2021-12-01 12:16:03 -05:00
Shivaram Lingamneni
72959eb1cf
Merge pull request #1852 from slingamn/fail_authenticate
...
add FAIL AUTHENTICATE VERIFICATION_REQUIRED
2021-11-30 20:35:33 -05:00
Shivaram Lingamneni
7d66368274
add FAIL AUTHENTICATE VERIFICATION_REQUIRED
...
From discussion with @emersion, this will help with UX if people try to
log into their unverified accounts.
2021-11-30 15:27:25 -05:00
Shivaram Lingamneni
645721f97e
fix missing parenthesis in UBAN INFO
2021-11-30 03:40:03 -05:00
Shivaram Lingamneni
fd45529d94
fix #1842
...
Warn about banning a single IPv6 address
2021-11-30 03:27:40 -05:00
Shivaram Lingamneni
eef9753912
reorder imports
2021-11-30 03:18:01 -05:00
Shivaram Lingamneni
9ff4047fa6
fix #1840
...
Account registrations pending verification should produce a logline and
send a sno.
2021-11-30 03:18:01 -05:00
Shivaram Lingamneni
ee720f60e2
fix #1826
...
CS PURGE should send a snomask
2021-11-30 03:18:01 -05:00
Shivaram Lingamneni
c51569420a
fix #1844
...
Send snomasks for HS SET
2021-11-30 03:18:01 -05:00
e0f4fcee61
NS SUSPEND now req 'ban' capabs
2021-11-18 17:11:32 +05:30
Shivaram Lingamneni
ac91beabfd
Merge pull request #1835 from slingamn/who.1
...
fix two WHO bugs
2021-11-16 21:45:40 -05:00
Shivaram Lingamneni
bc5c2a1250
fix casefolding issue in muting RELAYMSG
...
Reported by @mogad0n; the mute mask was being case-canonicalized,
but the RELAYMSG identifier wasn't being case-canonicalized before
the check.
2021-11-16 18:39:38 -05:00
Shivaram Lingamneni
2038763e10
fix #1730
...
`WHO #channel o` is supposed to return only server operators.
This is RFC1459 cruft; just return an empty list in this case.
2021-11-14 15:13:56 -05:00
Shivaram Lingamneni
62b2d0341e
fix #1831
...
RPL_ENDOFWHO should send the original, un-normalized mask
2021-11-14 13:41:27 -05:00
Shivaram Lingamneni
92f6bf2d03
set up new development version
2021-11-14 13:12:58 -05:00
Shivaram Lingamneni
c70e518eed
bump version to v2.8.0
2021-11-14 00:11:19 -05:00
Shivaram Lingamneni
050e27b31b
fix #1798
...
Improve documentation for use of certificate fingerprints
2021-11-13 19:58:56 -05:00
Shivaram Lingamneni
3d4170ef98
Merge pull request #1825 from slingamn/samode_f
...
SAMODE +f shouldn't require channel privileges
2021-11-11 12:32:17 -05:00
Shivaram Lingamneni
4bffdba610
SAMODE +f shouldn't require channel privileges
...
Reported by @Mikaela ; normally this requires +o or higher on the
channel that is the target of the forward, but SAMODE should bypass
this check.
2021-11-09 13:23:25 -05:00
Shivaram Lingamneni
4a3ac617a5
Merge pull request #1819 from slingamn/password_message
...
fix error message for NS SET EMAIL without the password
2021-11-08 03:20:45 -05:00
Shivaram Lingamneni
dc75b24d23
clarify comment on CAP byte arithmetic
2021-11-07 13:32:18 -05:00
Shivaram Lingamneni
9f0c3cdc0e
fix error message for NS SET EMAIL without the password
2021-11-04 20:10:56 -04:00
Shivaram Lingamneni
ea4b93dd59
bump version to v2.8.0-rc1
2021-11-03 05:33:46 -04:00
Shivaram Lingamneni
7e93770540
Merge pull request #1813 from slingamn/message_error
...
CHATHISTORY with nonexistent msgid should send empty batch
2021-11-02 20:59:02 -04:00
Shivaram Lingamneni
ad8c97c9bb
CHATHISTORY with nonexistent msgid should send empty batch
...
It was sending MESSAGE_ERROR, which was inappropriate. Send an empty batch
for now (this is at parity with the in-memory implementation).
2021-11-02 18:50:41 -04:00
Shivaram Lingamneni
c4e376c8bb
fix spurious error logline in schema change
2021-11-02 18:26:51 -04:00
Shivaram Lingamneni
85fabaad6d
fix case where CS TRANSFER as an operator required acceptance
...
Reported by @mogad0n. If a user had both operator privileges and
channel owner privileges, the CS TRANSFER would proceed as though
unprivileged, requiring acceptance by the receiving user. Fix this
to not require acceptance.
2021-11-02 18:26:47 -04:00
Shivaram Lingamneni
c9b54ee2b8
Merge pull request #1809 from slingamn/issue1676_again.3
...
fix #1676 , take 2
2021-11-02 03:51:04 -04:00
Shivaram Lingamneni
ea1678ec8f
Merge pull request #1810 from slingamn/nolusers
...
fix #1802
2021-11-01 23:25:32 -04:00
Shivaram Lingamneni
61bce74018
fix spurious "corrupt account creds" logline
...
Reported by @tacerus. This was most likely introduced by 8b2f6de3e
.
2021-11-01 18:48:37 -04:00
Shivaram Lingamneni
51d573d3c9
fix #1802
...
Add a config option to suppress LUSERS
2021-11-01 04:48:31 -04:00
Shivaram Lingamneni
8c556fe8c5
schema change to remove ReplayJoinsNever
...
See #1676
2021-11-01 04:36:06 -04:00
Shivaram Lingamneni
4749d7e776
fix #1676 , take 2
...
Ensure the pagination window is full by making sure that every history item
gets a replay line in CHATHISTORY output, even TAGMSG.
2021-11-01 04:34:59 -04:00
Shivaram Lingamneni
3ec5ffa340
Revert "fix #1676 "
...
This reverts commit 5bbee02fe6
.
2021-11-01 04:34:59 -04:00
Shivaram Lingamneni
5bbee02fe6
fix #1676
...
Fix various pagination issues with CHATHISTORY; also undo #491
(msgid munging).
2021-10-29 04:50:24 -04:00
Shivaram Lingamneni
7d5cb723b4
make ergo genpasswd
warn for bad passwords
2021-10-28 19:29:55 -04:00
Alex Jaspersen
53a7e8c334
Send snomask for channel mode changes via SAMODE.
...
Fixes #1787
2021-10-03 17:15:01 -07:00
Shivaram Lingamneni
b0f412538c
move signals code to utils/
2021-09-19 04:02:44 -04:00
Shivaram Lingamneni
2cae19dde5
remove unnecessary indirection in config
2021-09-19 02:09:43 -04:00
Shivaram Lingamneni
e0e4791f72
factor out some shared code
2021-09-18 21:28:16 -04:00
Shivaram Lingamneni
b8009c4a07
rename oragono.io/nope to ergo.chat/nope
2021-09-10 13:05:09 -04:00
Shivaram Lingamneni
eff6dd242b
Merge pull request #1791 from slingamn/hashmark
...
add # to disfavoredNameCharacters
2021-09-09 21:34:54 -04:00
Shivaram Lingamneni
69d88fb231
update logo in /INFO response
2021-09-09 21:25:07 -04:00
Shivaram Lingamneni
b83479247e
add # to disfavoredNameCharacters
...
Partially fixes #1679 , not sure whether to police the relaymsg config or not
2021-09-09 21:04:47 -04:00
Shivaram Lingamneni
aa969b7ff7
fix #1530
...
Warn if the user sent, e.g., /QUOTE /SAMODE instead of /QUOTE SAMODE
2021-09-05 20:14:13 -04:00
Shivaram Lingamneni
9b6ec04ca5
Merge pull request #1761 from delthas/feature-extended-monitor
...
Add support for extended-monitor
2021-08-26 10:14:31 -04:00
Shivaram Lingamneni
26cdb4cf36
fix #1650
...
RPL_WHOISACTUALLY should display some arbitrarily chosen IP address and
hostname.
2021-08-25 22:44:55 -04:00
Shivaram Lingamneni
8b2f6de3e0
Add email-based password reset ( #1779 )
...
* Add email-based password reset
Fixes #734
* rename SETPASS to RESETPASS
* review fixes
* abuse mitigations
* SENDPASS and RESETPASS should both touch the client login throttle
* Produce a logline and a sno on SENDPASS (since it actually sends an email)
* don't re-retrieve the settings value
* add email confirmation for NS SET EMAIL
* smtp: if require-tls is disabled, don't validate server cert
* review fixes
* remove cooldown for NS SET EMAIL
If you accidentally set the wrong address, the cooldown would prevent you
from fixing your mistake. Since we touch the registration throttle anyway,
this shouldn't present more of an abuse concern than registration itself.
2021-08-25 22:32:55 -04:00
Shivaram Lingamneni
12947644e2
remove SCRAM-SHA-256 from advertised SASL mechanisms
...
Advertising SCRAM-SHA-256 breaks irccloud, which doesn't fall back to PLAIN
if it sees SCRAM advertised but SCRAM then fails (as is the case for any
account password hashed on Ergo 2.7 or lower).
Leave a config option for irctest to enable it in the controller.
2021-08-25 18:34:27 -04:00
Shivaram Lingamneni
492109f29d
upgrade go to 1.17
2021-08-20 15:59:26 -04:00
Shivaram Lingamneni
fea8cc1b9a
Merge pull request #1778 from ProgVal/empty-realname
...
Add missing argument to ERR_NEEDMOREPARAMS on USER commands.
2021-08-13 16:58:53 -04:00
Valentin Lorentz
a90fbf9f2c
Add missing argument to ERR_NEEDMOREPARAMS on USER commands.
...
Refs:
* other instances in the codebase
* https://defs.ircdocs.horse/defs/numerics.html#err-needmoreparams-461
* https://modern.ircdocs.horse/#errneedmoreparams-461
2021-08-13 21:10:46 +02:00
Shivaram Lingamneni
0d438dd0d6
Merge pull request #1776 from ProgVal/kick-default-comment
...
Make kick messages default to the kicker name instead of the kicked
2021-08-13 14:20:17 -04:00
Valentin Lorentz
f33f41b0eb
Make kick messages default to the kicker name instead of the kicked
...
For consistency with RFC2812, Bahamut, Hybrid, Insp, Plexus4, Unreal.
https://datatracker.ietf.org/doc/html/rfc2812#section-3.2.8
At the expense of consistency with chary/solanum, irc2, and ircu2.
2021-08-13 20:16:37 +02:00
Valentin Lorentz
f6f25039b7
Advertise support for multiple KICK targets
...
This is already implemented, but TARGMAX=KICK:1 says it isn't.
Instead, let's advertise that indefinitely many targets are allowed.
Refs:
* https://defs.ircdocs.horse/defs/isupport.html#targmax
* https://github.com/ircdocs/modern-irc/pull/112
2021-08-13 19:42:03 +02:00
Shivaram Lingamneni
abfb8442ab
fix handling of +k with an empty key parameter
...
This should be disallowed; `MODE #keytest +k :` should just be an error.
2021-08-10 15:11:11 -04:00
Valentin Lorentz
e894c44960
Add missing channel parameter to ERR_INVALIDMODEPARAM.
2021-08-10 20:33:00 +02:00
Shivaram Lingamneni
1c5a485c17
Merge pull request #1768 from slingamn/scram_clientid
...
fix SCRAM not supporting client IDs
2021-08-03 23:51:10 -04:00
Alex Jaspersen
ecd878c169
Correct help text for NS CLIENTS LOGOUT.
...
"LOGOUT ALL" logs out all clients for a user.
Fixes #1712 .
2021-08-03 18:54:37 -07:00
Shivaram Lingamneni
117401f293
fix SCRAM not supporting client IDs
...
reported by @Mikaela
2021-08-03 11:47:00 -04:00
Shivaram Lingamneni
1389d89a9b
Merge pull request #1766 from slingamn/allow_truncation
...
fix incorrect handling of overlong lines when allow-truncation is enabled
2021-08-03 00:40:54 -04:00
Shivaram Lingamneni
cf25e894e1
fix incorrect handling of overlong lines when allow-truncation is enabled
2021-08-02 21:49:42 -04:00
Shivaram Lingamneni
4dd9af8f06
add autogeneration of SCRAM credentials on successful PLAIN
2021-08-02 12:26:58 -04:00
Shivaram Lingamneni
ebe1f84d64
consolidate login throttle checks
...
We can check once during initialization of the SASL session, e.g.
on receiving `AUTHENTICATE PLAIN` or `AUTHENTICATE EXTERNAL`
2021-07-30 14:06:13 -04:00
Shivaram Lingamneni
41822813c0
clean up redundant check for sasl mechanism
2021-07-30 14:03:40 -04:00
Shivaram Lingamneni
e1401934df
implement SCRAM-SHA-256
2021-07-30 12:20:13 -04:00
Shivaram Lingamneni
ef92318282
replace jwt library
...
Fixes #1762
2021-07-29 16:49:35 -04:00
delthas
7fde04ea94
Add support for extended-monitor
...
See: https://github.com/ircv3/ircv3-specifications/pull/466
2021-07-24 20:52:03 +02:00
Shivaram Lingamneni
6851901e20
fix #1756
...
A default channel mode of +i would block channel creation; fix this by treating
initial joins as SAJOINs.
Note that it's nontrivial to detect initial join in (*Channel).Join, because
having 0 members does not necessarily indicate a new channel.
2021-07-15 06:31:27 -04:00
Shivaram Lingamneni
c99b2be403
fix #1757
...
Allow SAJOIN or implicit always-on join to override channels.operator-only-creation
2021-07-15 06:27:37 -04:00
99610eae4b
add timeCreated to /uban list output
2021-07-14 12:36:45 +05:30
Shivaram Lingamneni
128142ca41
Merge pull request #1753 from slingamn/rename
...
fix #1751
2021-07-14 02:09:43 -04:00
Shivaram Lingamneni
5b317d4846
fix #1751
...
RENAME (channel rename) that was a simple case change (e.g.
renaming #chan to #CHAN) would delete the channel :-|
2021-07-13 08:47:16 -04:00
Valentin Lorentz
f58f8531b2
Restore support for multiple channels + single user
2021-07-12 20:59:05 +02:00
Val Lorentz
54c5d35193
Add support for KICK #chan user1,user2
...
This is one of the two cases of [RFC 2812 kicks](https://datatracker.ietf.org/doc/html/rfc2812#section-3.2.8 ):
even when there are multiple user targets, the RFC (and Unreal
and Inspircd and probably others) allows a single channel name.
2021-07-10 11:13:52 +02:00
Shivaram Lingamneni
907f82a27e
Merge pull request #1741 from slingamn/greylisting.3
...
user visible email errors, email timeouts
2021-07-09 07:22:03 -04:00
Shivaram Lingamneni
3fde046a01
Merge pull request #1743 from mogad0n/fix/disconn_sno_help_missing
...
fix missing disconnect sno help text
2021-07-08 11:04:25 -04:00
Shivaram Lingamneni
29f1afd565
Merge pull request #1742 from slingamn/register_update
...
update draft/register -> draft/account-registration
2021-07-07 09:17:20 -04:00
b2ea2583f4
add missing disconnect sno help
2021-07-07 18:43:42 +05:30
Shivaram Lingamneni
59bddd066f
update draft/register -> draft/account-registration
...
Fixes #1740
2021-07-07 07:37:46 -04:00
Shivaram Lingamneni
032ca175e4
add support for email timeouts
2021-07-07 07:21:22 -04:00
Shivaram Lingamneni
46572b871f
expose a user-visible error if direct email sending fails
...
See #1659
2021-07-07 07:21:22 -04:00
Shivaram Lingamneni
1c89f996bc
fix #1738
...
Fix error message for privileged NS PASSWD on a nonexistent account
2021-07-06 13:28:25 -04:00
Shivaram Lingamneni
fedf4a9176
add a debug logline for client read errors
...
May help clarify TLS configuration issues, possibly others too
2021-07-05 03:30:18 -04:00