spec/scansion/prosody.cfg.lua
author Jonas Schäfer <jonas@wielicki.name>
Mon, 10 Jan 2022 18:23:54 +0100
branch0.11
changeset 12185 783056b4e448
parent 9733 4f6413ec08a8
child 9734 69ef22961b7d
permissions -rw-r--r--
util.xml: Do not allow doctypes, comments or processing instructions Yes. This is as bad as it sounds. CVE pending. In Prosody itself, this only affects mod_websocket, which uses util.xml to parse the <open/> frame, thus allowing unauthenticated remote DoS using Billion Laughs. However, third-party modules using util.xml may also be affected by this. This commit installs handlers which disallow the use of doctype declarations and processing instructions without any escape hatch. It, by default, also introduces such a handler for comments, however, there is a way to enable comments nontheless. This is because util.xml is used to parse human-facing data, where comments are generally a desirable feature, and also because comments are generally harmless.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9297
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     1
--luacheck: ignore
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     2
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     3
admins = { "admin@localhost" }
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     4
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     5
use_libevent = true
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     6
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     7
modules_enabled = {
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     8
	-- Generally required
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     9
		"roster"; -- Allow users to have a roster. Recommended ;)
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    10
		"saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    11
		"tls"; -- Add support for secure TLS on c2s/s2s connections
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    12
		"dialback"; -- s2s dialback support
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    13
		"disco"; -- Service discovery
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    14
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    15
	-- Not essential, but recommended
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    16
		"carbons"; -- Keep multiple clients in sync
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    17
		"pep"; -- Enables users to publish their mood, activity, playing music and more
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    18
		"private"; -- Private XML storage (for room bookmarks, etc.)
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    19
		"blocklist"; -- Allow users to block communications with other users
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    20
		"vcard"; -- Allow users to set vCards
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    21
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    22
	-- Nice to have
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    23
		"version"; -- Replies to server version requests
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    24
		"uptime"; -- Report how long server has been running
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    25
		"time"; -- Let others know the time here on this server
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    26
		"ping"; -- Replies to XMPP pings with pongs
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    27
		"register"; -- Allow users to register on this server using a client and change passwords
9733
4f6413ec08a8 mod_mam: Add test for JID normalization in prefs (see #1275)
Kim Alvefur <zash@zash.se>
parents: 9626
diff changeset
    28
		"mam"; -- Store messages in an archive and allow users to access it
9297
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    29
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    30
	-- HTTP modules
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    31
		--"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    32
		--"websocket"; -- XMPP over WebSockets
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    33
		--"http_files"; -- Serve static files from a directory over HTTP
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    34
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    35
	-- Other specific functionality
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    36
		--"limits"; -- Enable bandwidth limiting for XMPP connections
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    37
		--"groups"; -- Shared roster support
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    38
		--"server_contact_info"; -- Publish contact information for this service
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    39
		--"announce"; -- Send announcement to all online users
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    40
		--"welcome"; -- Welcome users who register accounts
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    41
		--"watchregistrations"; -- Alert admins of registrations
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    42
		--"motd"; -- Send a message to users when they log in
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    43
		--"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    44
		--"proxy65"; -- Enables a file transfer proxy service which clients behind NAT can use
9626
269c6df1f0fb spec/scansion/prosody.cfg.lua: Add comment about mod_scansion_record
Kim Alvefur <zash@zash.se>
parents: 9624
diff changeset
    45
269c6df1f0fb spec/scansion/prosody.cfg.lua: Add comment about mod_scansion_record
Kim Alvefur <zash@zash.se>
parents: 9624
diff changeset
    46
	-- Useful for testing
269c6df1f0fb spec/scansion/prosody.cfg.lua: Add comment about mod_scansion_record
Kim Alvefur <zash@zash.se>
parents: 9624
diff changeset
    47
		--"scansion_record"; -- Records things that happen in scansion test case format
9297
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    48
}
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    49
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    50
certificate = "certs"
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    51
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    52
allow_registration = false
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    53
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    54
c2s_require_encryption = false
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    55
allow_unencrypted_plain_auth = true
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    56
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    57
authentication = "insecure"
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    58
insecure_open_authentication = "Yes please, I know what I'm doing!"
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    59
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    60
storage = "memory"
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    61
9733
4f6413ec08a8 mod_mam: Add test for JID normalization in prefs (see #1275)
Kim Alvefur <zash@zash.se>
parents: 9626
diff changeset
    62
mam_smart_enable = true
9297
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    63
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    64
-- For the "sql" backend, you can uncomment *one* of the below to configure:
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    65
--sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    66
--sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    67
--sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    68
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    69
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    70
-- Logging configuration
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    71
-- For advanced logging see https://prosody.im/doc/logging
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    72
log = "*console"
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    73
9300
8680a874f483 spec/scansion/prosody.cfg.lua: daemonize by default
Matthew Wild <mwild1@gmail.com>
parents: 9299
diff changeset
    74
daemonize = true
9299
9948e267254b spec/scansion/prosody.cfg.lua: Add pidfile option so Prosody can be daemonized
Matthew Wild <mwild1@gmail.com>
parents: 9297
diff changeset
    75
pidfile = "prosody.pid"
9948e267254b spec/scansion/prosody.cfg.lua: Add pidfile option so Prosody can be daemonized
Matthew Wild <mwild1@gmail.com>
parents: 9297
diff changeset
    76
9297
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    77
VirtualHost "localhost"
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    78
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    79
Component "conference.localhost" "muc"
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    80
	storage = "memory"
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    81
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    82
Component "pubsub.localhost" "pubsub"
31c02b3109e1 spec/scansion/prosody.cfg.lua: Config file to be used for integration tests
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
    83
	storage = "memory"