# HG changeset patch # User Matthew Wild # Date 1739615666 0 # Node ID 4b83dbcddcff12f737d9a449e3db1342cf927e6d # Parent 4ba7216579ebb5780e7015dc24807bde8a8e5ded# Parent 1aa7efabeacb05a75f2e6466a1677972f3436c24 Merge 13.0->trunk diff -r 4ba7216579eb -r 4b83dbcddcff .semgrep.yml --- 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] diff -r 4ba7216579eb -r 4b83dbcddcff plugins/mod_cloud_notify.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"; diff -r 4ba7216579eb -r 4b83dbcddcff plugins/mod_cron.lua --- 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" }; diff -r 4ba7216579eb -r 4b83dbcddcff plugins/mod_invites.lua --- 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("^[^:]+:", ""));