Commit Graph

242 Commits

Author SHA1 Message Date
696ff9b7e7 sandbox: Allow TIME group 2021-12-02 10:06:21 +01:00
5570154113 fscache: Fix starts_with() broken by b41a5f4e5b 2021-11-30 19:14:59 +01:00
4f6bcd27b4 sandbox: Sync iwth qssb.h upstream: Use whitelisting and groups 2021-11-14 21:54:08 +01:00
bbe74a2c50 handlers: HandlerSearch: Add missing call to setGeneralVars() 2021-11-14 21:54:08 +01:00
5db9305408 template: display headers inline (backport from production) 2021-11-14 21:54:08 +01:00
c90e26a374 template: Remove space between header links 2021-10-26 23:22:05 +02:00
b297498ca9 template: Don't render searchbar in portrait. Show link instead
Issue: #18
2021-10-26 23:07:37 +02:00
fdcef18861 HandlerSearch: Render a form when no q= given 2021-10-26 23:07:37 +02:00
75268e0073 sandbox: Disable Landlock due to qssb.h issue #19 2021-10-26 23:07:37 +02:00
cc4506b918 submodules: sync with latest upstream 2021-10-26 10:47:02 +02:00
017932e673 Fix -wreturn-type warnings 2021-10-25 18:13:25 +02:00
ed61003636 C++20: Avoid implicit capture 2021-10-25 18:09:46 +02:00
ad42c0f046 handlers: HandlerPageEdit: canAccess(): Check with effectivePermisisons() 2021-10-25 18:07:23 +02:00
6304554358 Add [[maybe_unused]] to silence unhelpful warnings 2021-10-25 17:56:37 +02:00
0aa4bca6cc Fix gcc-11 etc. compilation errors 2021-10-25 13:31:40 +02:00
b41a5f4e5b fscache: removePrefix(): use starts_with() 2021-10-19 15:07:10 +02:00
873401694e Remove utils::hasKey(), as we now have .contains() 2021-10-19 12:48:45 +02:00
d035579da7 Makefile: Switch to C++20 2021-10-19 12:47:57 +02:00
eb292a7d79 CategoryDaoSqlite: deleteCategory(): Fix broken query 2021-10-12 20:10:35 +02:00
420e541e75 CLI: Implement category delete,show,list 2021-10-12 20:02:43 +02:00
c18178a50f SqliteQueryOption: build(): Handle includeInvisible = true properly 2021-10-12 20:02:03 +02:00
7a2f15cabe handlers: Introduce HandlerVersion to return the verison string 2021-10-10 22:39:35 +02:00
c9dc3416d7 TemplatePage: Change 'content' to shared_ptr 2021-10-10 22:32:13 +02:00
92be470545 Makefile: Remove LDFLAGS from .o compilation 2021-10-10 20:17:38 +02:00
d5485a833f CLIConsole: On 'exit', ask whether to quit attached instance 2021-10-10 20:15:28 +02:00
0bdb22c170 gateway: HttpGateway: convertRequest(): Don't convert param to std::string 2021-10-10 20:15:28 +02:00
eb49b013a7 Makefile: Add profile target 2021-10-10 20:15:28 +02:00
9593429f95 utils: trim(): Take string_view 2021-10-10 20:15:28 +02:00
86ac86b83f Response: addHeader(): Pass by value, not reference 2021-10-10 20:15:28 +02:00
92e7390056 utils: Pass by value where it makes sense 2021-10-10 20:15:28 +02:00
b1a8572eb6 utils: hasKey(), getKeyOrEmpty(), getAll(): Take params as references
Somehow, the fact that multimap was being copyied slipped through.
2021-10-10 20:15:28 +02:00
44ade88cae Template: createPage(): Take std::string_view 2021-10-10 20:15:28 +02:00
aadb623bf7 UserDaoSqlite: Remove redundant std::move 2021-10-08 23:38:22 +02:00
828d827c3d Adjust to new Template::getPage() returning value, not reference 2021-10-08 00:11:58 +02:00
8ffa64beea Template: Use MapCache, getPage(): Return value, not reference 2021-10-08 00:11:30 +02:00
e970ba1682 cache: MapCache: Introduce MapCache, thread-safe cache (key/value store) 2021-10-08 00:08:00 +02:00
b59e81a41d CLI: Begin 'page' and 'pageperms' commands 2021-10-05 21:57:20 +02:00
f002969cc1 PermissionsDao: Add save() 2021-10-05 21:51:31 +02:00
c4072a7e95 Sandbox: Remove multiple stages
While interesitng in theory, there is nothing to be gained here,
because we don't really have user input at those early stages.

As we are also not a privileged process, those early stage
sandboxes in the end are not worth it, since they increase
complexity while there is no benefit in practise.

So, reduce those 3 stages to a single one (enable()), which we
activate after CLI server has launched.
2021-10-03 23:53:56 +02:00
257675485d Template: Remove redundant debug output 2021-10-03 23:13:59 +02:00
94ade7238e CLI: Add 'version' command 2021-10-03 23:04:46 +02:00
fa5e75893f Add version.{h,cpp}: Returning version info 2021-10-03 23:01:19 +02:00
3d0fce590b Introduce CLI
main: Parse args using getopt_long() in main().

Begin implementation of a CLI. It can be launched
using ./qswiki config --cli.

Allow connecting to another instance using "attach" command.
This uses Unix domain sockets, and in the future can be used
to drop caches, reload template, etc.

Closes: #21
2021-10-03 17:05:46 +02:00
1082f8ac5a Permissions: Add toString()
Get a (reasonable) string representation of the permissions contained
in a Permissions object.
2021-10-03 17:01:48 +02:00
8b044d712b Authenticator: Introduce AUTH_DEFAULT_SALT_SIZE 2021-10-03 17:01:03 +02:00
5037a17fba utils: introduce trim() 2021-10-03 16:51:04 +02:00
164b2c19ee userDao: Implement list() 2021-10-03 16:51:04 +02:00
8d685dc581 Makefile: Remove -lseccomp as we don't need it anymore 2021-09-29 18:33:45 +02:00
ed43f5f700 submodules: update cpp-httplib 2021-09-29 18:28:18 +02:00
10f00aeb45 main: Pass absolute path of config file
As sandboxing code chroots and chdirs away,
2021-09-23 17:13:08 +02:00