Software /
code /
prosody
Changeset
13702:4b83dbcddcff
Merge 13.0->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 15 Feb 2025 10:34:26 +0000 |
parents | 13699:4ba7216579eb (current diff) 13701:1aa7efabeacb (diff) |
children | 13704:1f428259544c |
files | |
diffstat | 4 files changed, 19 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/.semgrep.yml Fri Feb 14 20:57:43 2025 +0100 +++ b/.semgrep.yml Sat Feb 15 10:34:26 2025 +0000 @@ -28,3 +28,12 @@ message: Use :get_text() to read text, or pass a value here to add text severity: WARNING languages: [lua] +- id: require-unprefixed-module + patterns: + - pattern: require("$X") + - metavariable-regex: + metavariable: $X + regex: '^(core|net|util)\.' + message: Prefix required module path with 'prosody.' + severity: ERROR + languages: [lua]
--- a/plugins/mod_cloud_notify.lua Fri Feb 14 20:57:43 2025 +0100 +++ b/plugins/mod_cloud_notify.lua Sat Feb 15 10:34:26 2025 +0000 @@ -5,13 +5,13 @@ -- This file is MIT/X11 licensed. local os_time = os.time; -local st = require"util.stanza"; -local jid = require"util.jid"; -local dataform = require"util.dataforms".new; -local hashes = require"util.hashes"; -local random = require"util.random"; -local cache = require"util.cache"; -local watchdog = require "util.watchdog"; +local st = require"prosody.util.stanza"; +local jid = require"prosody.util.jid"; +local dataform = require"prosody.util.dataforms".new; +local hashes = require"prosody.util.hashes"; +local random = require"prosody.util.random"; +local cache = require"prosody.util.cache"; +local watchdog = require "prosody.util.watchdog"; local xmlns_push = "urn:xmpp:push:0";
--- a/plugins/mod_cron.lua Fri Feb 14 20:57:43 2025 +0100 +++ b/plugins/mod_cron.lua Sat Feb 15 10:34:26 2025 +0000 @@ -78,7 +78,7 @@ args = {}; handler = function(self, filter_host) local format_table = require("prosody.util.human.io").table; - local it = require("util.iterators"); + local it = require("prosody.util.iterators"); local row = format_table({ { title = "Host"; width = "2p" }; { title = "Task"; width = "3p" };
--- a/plugins/mod_invites.lua Fri Feb 14 20:57:43 2025 +0100 +++ b/plugins/mod_invites.lua Sat Feb 15 10:34:26 2025 +0000 @@ -6,8 +6,8 @@ local argparse = require "prosody.util.argparse"; local human_io = require "prosody.util.human.io"; -local url_escape = require "util.http".urlencode; -local render_url = require "util.interpolation".new("%b{}", url_escape, { +local url_escape = require "prosody.util.http".urlencode; +local render_url = require "prosody.util.interpolation".new("%b{}", url_escape, { urlescape = url_escape; noscheme = function (urlstring) return (urlstring:gsub("^[^:]+:", ""));