Commit graph

1294 commits

Author SHA1 Message Date
Max Leiter dd05ee3a65
TypeScript and Vue 3 (#4559)
Co-authored-by: Eric Nemchik <eric@nemchik.com>
Co-authored-by: Pavel Djundik <xPaw@users.noreply.github.com>
2022-06-18 17:25:21 -07:00
Eric Nemchik 2e3d9a6265
Fix yarn dev (#4574)
* Fix yarn dev and yarn test
2022-05-21 11:45:42 -07:00
Reto d4cc2dd361
Refactor config out of Helper (#4558)
* Remove config from Helper

Helper is the usual util grab bag of useful stuff.
Somehow the config ended up there historically but
structurally that doesn't make any sense.

* Add cert folder to prettier ignore file
2022-05-01 12:12:39 -07:00
Reto Brunner c8115e22ac enable znc/playback even without message storage
Fixes: https://github.com/thelounge/thelounge/issues/4464
2022-04-28 17:02:36 +02:00
Reto Brunner aa7db1e7f7 Merge pull/4524: Add prefetchTimeout 2022-04-27 18:22:49 +02:00
Reto Brunner c9c8cadb1a Merge pull/4477 Preserve client certificate 2022-04-27 17:58:09 +02:00
xnaas 57b1e51e9f
set 'video/quicktime' to 'video/mp4' (#4495)
`video/quicktime` only plays in Firefox and Safari.
`video/mp4` plays in Firefox, Safari, and Chromium-based browsers.
2022-04-11 17:50:00 -07:00
Val Lorentz 20ed3e6dc5
sqlite: Escape '%' and '_' in search queries. (#4487)
I picked '@' arbitrarily, it doesn't matter much.
I just don't like '\' because it needs to be escaped itself in the JS code,
which is annoying.
2022-04-11 17:49:13 -07:00
Reto e4840b4d75
Plugins: include pre-releases in compatibility lookup (#4506)
Semver doesn't treat pre-release versions as upgrades, meaning >4.3.0 isn't satisfied
by 4.3.1-rc.1.
For the purpose of TL plugins however, we are only interested in the semantic version and
expect that rc's adhere to the compatibility promise.
2022-04-11 17:47:51 -07:00
Reto d7bba325a7
Fix user file permissions on create (#4507)
User files contain secrets and should be protected.
Chances are that the user folder can be protected as well,
so let's do that if TL is creating the folder.
2022-04-11 17:47:22 -07:00
Reto 815319810c
cli: don't error if the user folder doesn't exist (#4508)
The user folder gets created on demand, thelounge list should not
fail if the folder doesn't exist.
This just means that no users are present, so report that instead.
2022-04-11 17:46:29 -07:00
Reto 37d7de7671
Kill TL when ident can't start up (#4512)
Fixes: https://github.com/thelounge/thelounge/issues/4509
2022-04-11 17:45:36 -07:00
Emily Strickland 3a84290314
Apply fixes suggested by Prettier to fix CI 2022-04-09 19:40:38 +00:00
Emily Strickland ff886846a8
Warn about unset prefetchTimeout, default to 5000 ms 2022-04-09 00:19:08 +00:00
Emily Strickland 3796485217
Configure link fetch to use prefetchTimeout
This change modifies the `fetch` function in `link.js` to use the new `prefetchTimeout` config setting introduced in the previous commit. This allows configuring the length of the timeout.

I've added a comment here to indicate milliseconds are the unit in use, since otherwise that would no longer be obvious from the code without looking at the default value (which could change).
2022-04-08 22:49:20 +00:00
Reto Brunner f440b67dbe Change sqlite3 module name to the actual name
It leads to confusion as the module is named "sqlite3", not
"node-sqlite3"
2022-03-12 16:39:03 +01:00
Val Lorentz ae7020f569 Do not remove client certificate, even when TLS is disabled
It does not really make sense to remove it, as it can lock someone out of
their account, just by temporarily disabling TLS.
2022-03-05 11:20:57 +01:00
Max Leiter 551f85ea51
Fix /collapse and /expand from interacting with the server in public mode (#4488)
Reported by xnaas on IRC
2022-02-18 12:21:17 -08:00
Val Lorentz 66455f2c40
Show a nicer error in Chan.loadMessages() when network is misconfigured (#4476)
Show a nicer error in Chan.loadMessages() when network is misconfigured

ie. an actual error message instead of crashing on a `null` value.
2022-02-16 16:27:41 -08:00
Val Lorentz c12dd6c740
Network.validate: Deduplicate code + tell users what the invalid hostname is (#4475)
* De-duplicate error message creation in Network.validate()
* Tell users what the invalid hostname is.
* Reword the log error message
2022-02-16 16:27:14 -08:00
Val Lorentz 53b4d00732 Preserve client certificate when TLS is indirectly enabled by a STS policy
Closes GH-4152.
2022-02-13 14:43:04 +01:00
xnaas 9dfb2a3fdb
Upload m4a as audio/mp4; embed audio/mp4, x-flac, and x-m4a (#4470)
* 'audio/x-m4a' should be 'audio/mp4'
* add handling for x-flac and x-m4a
2022-02-11 17:42:59 -08:00
Max Leiter 4be9a282fa
Add the option to mute channels, queries, and networks (#4282)
Co-authored-by: Reto <reto@labrat.space>
2022-02-10 17:56:17 -08:00
Val Lorentz 1e3a7b1250 Emit a message for SASL loggedin/loggedout events
Closes GH-3921
2022-02-10 22:30:04 +01:00
Reto d228a8c4f4
Bump most deps (#4453) 2022-02-09 15:27:34 -08:00
Reto Brunner c0b81902f5 clientCert: fix up error message 2022-02-04 23:06:53 +01:00
Reto Brunner 0d209fce09 Clear obsolete mentions upon channel part
Currently, the mentions only track the chanID and MsgID.
However, when we part a channel the chanID becomes orphaned.

Considering that mentions from a parted channel probably aren't
that relevant, let's automatically clear them when we part.
Should the user really want to look at them again, they can re-join
the channel and get the scroll back that way.
2021-12-29 16:46:16 +01:00
John Sullivan cd7916b6d9
Merge pull request #4427 from thelounge/bookworm/mode
handle RPL_UMODEIS
2021-12-06 13:38:29 -08:00
Max Leiter 2c79d53c6d
Merge pull request #4428 from maxpoulin64/switch-busboy-implementation
Switch busboy implementation to `@fastify/busboy`
2021-12-06 12:38:58 -08:00
Reto Brunner 514c6fbf95 Rewrite conditional as switch
This is actually what the code tries to do, the conditional just
makes it harder to read
2021-12-06 07:24:21 +01:00
Reto Brunner 1953e03253 Add RPL_UMODEIS msg handler 2021-12-06 07:24:21 +01:00
Max Leiter 981de663fb
Merge pull request #4426 from brunnre8/worktrees
getGitCommit: allow git worktrees
2021-12-05 14:23:12 -08:00
Maxime Poulin 2c2dd1c76f Switch busboy implementation to @fastify/busboy
I've been notified the current implementation is abandonned and has been forked by fastify to fix bugs, including some crashes and hangs:
See:
* https://github.com/mscdex/busboy/issues/250
* https://github.com/mscdex/dicer/pull/22
* https://github.com/mscdex/dicer/pull/25
2021-12-04 19:49:21 -05:00
Max Leiter ecc0b9183e
Merge pull request #4423 from brunnre8/exit
Use non 0 exit code in abnormal shutdown
2021-12-04 14:57:48 -08:00
Reto Brunner 1c08b6dce6 getGitCommit: allow git worktrees
Change the short circuit logic to only test for a .git path.
With worktrees that's just a file, not a directory and we really
shouldn't play git anyhow and not rely on implementation details.
2021-12-03 18:16:30 +01:00
Reto Brunner 96c2d2419b Use non 0 exit code in abnormal shutdown 2021-12-02 07:55:06 +01:00
Max Leiter 304d207820
Merge pull request #4361 from supertassu/kickban 2021-12-01 18:25:09 -08:00
Reto Brunner 0ff9703a28 logs: Set umode to a more restrictive value
When TL first creates the log folder, let only the user read the
log files, should the admin override that subsequently we'll
simply warn about it but respect the decision.

Meaning we have private by default, but this can be overriden
2021-11-30 19:13:33 +01:00
Reto Brunner dc3a387120 vapid: keep the file secret
Contains a secret key, so we probably should keep it, well, secret.
Warn if the file is world readable.
2021-11-30 19:08:29 +01:00
Taavi Väänänen 324fb9023e
Add /kickban
This commit adds a new command, /kickban, that is a combination of /kick
and /ban: it kicks the specific user from the channel and then sets the
+b mode to ban the user from the channel.
2021-11-30 12:07:11 +02:00
sfan5 5f7ec9e8da
Don't download image contents during prefetch if not needed (#4363) 2021-11-22 16:59:33 -08:00
Max Leiter 40a5ee70b6
Disable /search and hide help item if searching is disabled 2021-11-17 20:23:51 -08:00
Max Leiter 3cec329e3b
Merge branch 'master' into fix-search-query 2021-11-15 12:42:56 -08:00
Max Leiter 186f8f68cd
Merge pull request #4351 from brunnre8/glob
Allow wildcards in hostmask
2021-11-04 14:36:27 -07:00
Max Leiter 59280cfdfd
Merge pull request #4329 from brunnre8/plugins
Add more plugin functionality
2021-11-04 14:12:02 -07:00
Reto Brunner 67503efd21 Allow wildcards in hostmask
According to https://modern.ircdocs.horse/#wildcard-expressions
masks should support "*" and "?" wildcards.
Within TL this only impacts the /ignore functionality.

The reasoning for doing this is to ignore say GuestNNNN!*@* with
guest*!*@* and be done with it if someone spams a gateway.
2021-11-04 20:16:20 +01:00
Max Leiter 0381cd11bf
Merge pull request #4345 from itsjohncs/small-db-cleanups
Small cleanup of messageStorage/sqlite.
2021-11-03 15:45:48 -07:00
itsjohncs 044cd2403b Small cleanup of messageStorage/sqlite.
* Extend test coverage to the `search` function.
* Test sort order of messages from `getMessages` and `search`
* Move reversal of `search` results from Vue to messageStorage.
* Remove unnecessary uses of `sqlite.serialize` in tests.
* Return promises from test functions where possible.
2021-10-28 00:48:11 -07:00
Reto Brunner 544146d9aa Force CSP header for all requests
Currently styles / plugins were not actually under the CSP
header protection.
There's no real reason to not have them for all requests, so
add them as a root middleware.
2021-10-26 22:20:06 +02:00
Nachtalb 206d554ce1
Save the proxy password so you don't have to reenter it after restart 2021-10-24 21:27:43 +02:00