From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29008 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: William Lupton Newsgroups: gmane.text.pandoc Subject: Loading local lua Date: Thu, 12 Aug 2021 09:43:01 +0100 Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a3445205c958b9b2" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7575"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCS4HJ6WSAHBBIN62OEAMGQEZNKQ37Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Aug 12 10:43:16 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f183.google.com ([209.85.208.183]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mE6J2-0001mD-7k for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 12 Aug 2021 10:43:16 +0200 Original-Received: by mail-lj1-f183.google.com with SMTP id bn35-20020a05651c17a3b02901b483917a19sf1761251ljb.2 for ; Thu, 12 Aug 2021 01:43:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1628757795; cv=pass; d=google.com; s=arc-20160816; b=iwvpFT86waCTTMWJmZrKU47SMtekx/AIpOp+YW04HmJUP7xEWn9MKOqdqE20+tRgwy CmtaBE7gLoYUxNqwW45Qd4PgLEI6lbJSQGi2HhJMG7COpu+4qAQdu+KIvz21Sjti9C8+ CXojOnOjlgkA19qbVBREWPWadn1mGjccCnP6+y8GeMAr6uUvOQiELsf3mKX43c66yDND MFAKlmuzHGHZmltTYnmmHIkidM42lpXpLVgvJK2fDH2+kiimi1LQe7SndT0IC2ZipIJi 5u93mpch4kyzJ/lceKWP/Nzo3zMh5pPygmArKeUJ2CTcfsO332ZEhwK8Tjq/EKynGP64 SGgg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date :from:mime-version:sender:dkim-signature; bh=osZE5DCVuFGg2d1JenZt5m9Csw760T8RdnhsWS8shLc=; b=vEOGaFlpQlo83YH57THp3cN9yWnufOWWhBIAg6fZkjhNkFQqon7WrMFTVxDhONed4q tRJ3hF4BJGhdrvJH5cEvclTV53HMdZGX0n3koRJcpDyPo/GKgcrXVymdl4XE2nJ772nh qChpDgv+VVyt62EH+hZKPUwcvGj1sd8SRvofut/BL2Cd3UDA1Fwz6i6VNvjBqh99A7t7 dGPaTcxueyBVPA6zbYBIQbD+RtYz6eQewqSLqDe2rM/+9cJKmHJSJ/YXzeJsBWiePWMP 8c1v2zMmtUwiq/P5h0KM+QDfDlR4ezv4/NtTZ+lIFuQIyzR3xjHM109F/NEFzOmJHHK6 PFXw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20150623.gappssmtp.com header.s=20150623 header.b=MJyUqFb8; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::52f as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:date:message-id:subject:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=osZE5DCVuFGg2d1JenZt5m9Csw760T8RdnhsWS8shLc=; b=WpypL+GNBP4ycLye7zLQwG3G+CO9DErhH9d01Q1UxIpT5jKazaSscvCLpXAU2jXp78 jPbfhSyQjPH4VLjsvKD01T8GYL+L5iKuqkYHKcWmnAP8sTwLW+yaQfMNCuwaoKuPbEne OvoW/VwOBYBcG57ixge8iU1qhqRku3x8z7eHo9AwmFxlDAY5zhASePJq9IzTAHKyhh+E f8eDpD/Mpjmdo4OvmaYT2r7ds5Z39Av0gbUUOfAB4yKLnjc/wnvZ5zZCkdLtCZoSHFZu 86iJtpKiBZ3eYppAmx80dFCXjTL78U+hvwrKgpCcGOuvAeMEGr/vBlnoHdW3Pzxeyv/M Rzaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:date:message-id:subject :to:x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=osZE5DCVuFGg2d1JenZt5m9Csw760T8RdnhsWS8shLc=; b=dYVn0lWxuSRT4gqwod5eD0+LKU17WSSzlCJHAUToIVnD+OritlrLEB1nSvkThJhLw4 0O0eTR+aQhrvk71W0RKEtVHDxCZ/p248xAZ7XV9pvRvkkzVK5DkEVetegMnoJWqCnmc5 wBE/JKOdC1e6EZ5YJRvQE3MiAw1I/EnE8Xe0NIeRwnfQ96tV7Mh4nEUJNucVP0mjk6TB 1tkm4+g/M+MfOwmR8BuD6cbDn9aqNHljtX+Pdin5+GfbDiboQ/Zbf1nNrZeo2YLetRo+ r2ZW+tqIn34lSHRWNWh+CGWHpojRBlYT0j84qDT5AJYIutGPzTifzr6GO1dxtq9YNGSq 1S7g== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530dHFZx9H0HPqWfRdd9VJ+8IvzeJchVXAXzD/IPrU4OSIYPSoGn 6heyDeEPT0FLDYzRj+eBLOo= X-Google-Smtp-Source: ABdhPJxV5rW6t/3Vk6aRxbtit8aQgqoDHWmCnJ5N+PGmpYwL5R7AjGFCmmHbT349PDIVfJQd0pCYDg== X-Received: by 2002:a19:6b02:: with SMTP id d2mr1835987lfa.522.1628757795755; Thu, 12 Aug 2021 01:43:15 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:8612:: with SMTP id a18ls850030lji.2.gmail; Thu, 12 Aug 2021 01:43:13 -0700 (PDT) X-Received: by 2002:a05:6512:1390:: with SMTP id p16mr1717005lfa.39.1628757792937; Thu, 12 Aug 2021 01:43:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628757792; cv=none; d=google.com; s=arc-20160816; b=uRE0oXV/JCMKu/F/veGkLKcGfprDw8Kl0D2Jwg3p+RqeYyg1TiWGsgQ8t8rtveOQIs pwfxtJZJUYoV17NhU7St7vYhLcdHg47XTOclUYsdsJUJTuNhz3MsCoiiiaB1FtQsyBs/ oon3/wrWTGuKx2eTkuAZbT2gnzIZXyP+Ose5VYUKpYYZRxqDELD//ZySFdcsksGzuFin sHgLwr2gv1gCpjPBzTH3mU9LWrG/j+Jsz9btLXtS2aXHN5ObixbjCMUiQLdlvgYCs5Eg wNs47tuUphU5ib6dKUhShGTQov+puelQgqD0PbJ03AaDAhuKbVutynlKttTpAR7QjIj4 fxfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=+d/BRADqg2s2Y9lJjjLGw9spyaaw9ssyFYB8b7MJW8s=; b=SRCU3kLv9OCr1CPF1EBDg/qPClXHo7Lc3M7vHYcHj09Bg4vL8LGmQcpO9IE23YdlKT 1A+bBp0YX2/1gkFmlbe7tihcZYPfQgJkyDdYCl9IoHQpIwU33xtQKFkr5aid/O5utfCg OhAEeTkjb7iyAk4RWuCq9L5HoaUdXcR5uVzdb09sN8yWsBMmQS5m0qi2K2kHpXAs+pTv Mrd//MUeTEB75e9wQyN2LAVlB2omkQM49MqHqhIRa4BVRo0ss+e/fBH/3mqQp2gfiAqm KhNZUHJVShaz6NstnpsHdP2YmyQP0V+l9jhS4ofYOdXBPBWzsDd6xcGcyZIYeVFlizV9 pmfg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20150623.gappssmtp.com header.s=20150623 header.b=MJyUqFb8; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::52f as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org Original-Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com. [2a00:1450:4864:20::52f]) by gmr-mx.google.com with ESMTPS id q8si80622ljb.6.2021.08.12.01.43.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Aug 2021 01:43:12 -0700 (PDT) Received-SPF: pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::52f as permitted sender) client-ip=2a00:1450:4864:20::52f; Original-Received: by mail-ed1-x52f.google.com with SMTP id r19so5139164eds.13 for ; Thu, 12 Aug 2021 01:43:12 -0700 (PDT) X-Received: by 2002:a05:6402:2690:: with SMTP id w16mr4154762edd.71.1628757792335; Thu, 12 Aug 2021 01:43:12 -0700 (PDT) X-Original-Sender: wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20150623.gappssmtp.com header.s=20150623 header.b=MJyUqFb8; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::52f as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:29008 Archived-At: --000000000000a3445205c958b9b2 Content-Type: text/plain; charset="UTF-8" Hello, My lua filters and writers all do "local utils = require 'utils'" to load utils.lua from my user data dir. I recently upgraded from pandoc 2.11.4 (23 Jan) to 2.14.1 (18 Jul) and therefore this stopped working, as discussed here: - Lua filter can not find lua package in data-dir (predates pandoc 2.12) - Using require on Lua filter doesn't work anymore in Pandoc 2.12 Following the advice in the second thread, I ended up setting LUA_PATH. I preferred this solution because it didn't involve changing any source files. My pandoc command used to be "pandoc --data-dir=$DATADIR ..." and is now "LUA_PATH=$DATADIR/?.lua pandoc --data-dir=$DATADIR ..." so it seems to me that I must be subverting the fix to any security problems that were fixed by not searching the user data dir! I'm wondering whether it might be possible to restore searching of the user data dir, possibly with some restrictions to prevent things like overriding pandoc.List. It would be really nice to be able to use a simple "require". Thanks, William PS, Note that utils.lua isn't in the same directory as the filters or writers. These are in $DATADIR/filters and $DATADIR/writers, whereas utils.lua is in the parent $DATADIR. I'd be happy to put utils.lua in some other $DATADIR sub-directory. -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxhAWWYZO5C4sdwSEpRGiavcNg-6JzWvGjMtzOs5rFjDuw%40mail.gmail.com. --000000000000a3445205c958b9b2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

My lua filters and writers all d= o "local utils =3D require 'utils'" to load utils.lua fro= m my user data dir.

I recently upgraded from = pandoc 2.11.4 (23 Jan) to 2.14.1 (18 Jul) and therefore this stopped workin= g, as discussed here:
  • Lua filter can not find lu= a package in data-dir=C2=A0(predates pandoc 2.12)
  • Usin= g require on Lua filter doesn't work anymore in Pandoc 2.12
  • Following the advice in the second thread, I ended up setting LUA_PA= TH. I preferred this solution because it didn't involve changing any so= urce files.

    My pandoc command used to be "pan= doc --data-dir=3D$DATADIR ..." and is now "LUA_PATH=3D$DATADIR/?.= lua pandoc --data-dir=3D$DATADIR ..." so it seems to me that I must be= subverting the fix to any=C2=A0security=C2=A0problems that were fixed by n= ot searching the user data dir!

I'= m wondering whether it might be possible to restore searching=C2=A0of the= =C2=A0user data dir, possibly with some restrictions to=C2=A0prevent things= like overriding pandoc.List. It would be really nice to be able to use a s= imple "require".

Thanks,
Willi= am

PS, Note that utils.lua isn't in the same d= irectory as the filters or writers. These are in $DATADIR/filters and $DATA= DIR/writers, whereas utils.lua is in the parent $DATADIR. I'd be happy = to put utils.lua in some other $DATADIR sub-directory.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.= google.com/d/msgid/pandoc-discuss/CAEe_xxhAWWYZO5C4sdwSEpRGiavcNg-6JzWvGjMt= zOs5rFjDuw%40mail.gmail.com.
--000000000000a3445205c958b9b2--