all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-api/pmg-gui v3] allow / in local part of pmg-email-address
@ 2021-02-02 13:03 Stoiko Ivanov
  2021-02-02 13:03 ` [pmg-devel] [PATCH pmg-api v3 1/2] api: statistics: add common method for details Stoiko Ivanov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stoiko Ivanov @ 2021-02-02 13:03 UTC (permalink / raw)
  To: pmg-devel

v2->v3:
* addressed Thomas' feedback (huge thx!!)
* changed the API to have a dedicated /statistics/detail call, which handles
  all 3 detail-statistics calls (based on the required type parameter)
* dropped the already applied patches

cover-letter for previous series:
v1->v2:
* Had a chat with Thomas off-list - who (righfully) pointed out that the paths
'contact' and 'contacts' seem a bit shoddy and counterintuitive
* reimplemented the change so that it still uses '/contact' as prefix,
but instead of providing the address as next component uses 'detail' (and
provides the address in the detailaddress parameter)
(the two points above apply to 'sender' and 'receiver' as well)

* individual notes below the individual patches (where applicable)

original cover-letter:
The following patchset is a result of investigating a thread in our
community forum [0].

While I'd consider e-mail addresses with '/' in the local-part quite odd,
as so often smtp RFCs are quite liberal with what smtp servers (have to)
accept. Postfix happily accepts mails with '/' in the local-part, and
should they end up in the quarantine, it is currently not possible to
remove them (short of waiting for quarantine retention period).

the 4 places where we use the pmg-email-address format are:
* quarantine (pmail parameter)
* statistics (contact, receiver, sender detail views)
* fetchmail
* pbsconfig (username)

the first two are problematic in the sense that external sources might
cause a mail-address with '/' to get stored. pbsconfig stores a username
with '/' (which then fails since the repository verification does not
expect a '/' in the username/token), fetchmail accepts it (and stores its
config with all special characters escaped)
only the statistics api calls are problematic, since the detail views pass
the mail-address as path component (and the decoding inside pve-http-server
breaks the api call resolution) - addressing this is the main part of the
patchset.

It follows a similar series by Dominik for the user blocklists [1].

patch 1/5 for the api is a cleanup that caught my eye
patches 2+3 for the api could probably be squashed (happy to send a v2 for
this - but feel free to squash them if this gets applied as is)

tested it a bit on my setup (with a limited set of addresses in the
statistics database).

[0]
https://forum.proxmox.com/threads/pmg-error-parameter-verification-failed-400.82353/
[1] https://lists.proxmox.com/pipermail/pmg-devel/2020-March/000952.html
pmg-api:
Stoiko Ivanov (2):
  api: statistics: add common method for details
  utils: allow '/' inside email address localpart

 src/PMG/API2/Statistics.pm | 63 ++++++++++++++++++++++++++++++++++++++
 src/PMG/Utils.pm           |  2 +-
 2 files changed, 64 insertions(+), 1 deletion(-)

pmg-gui:
Stoiko Ivanov (1):
  statistics: use new api call for detailed stats

 js/ContactStatistics.js  | 10 +++++-----
 js/ReceiverStatistics.js | 10 +++++-----
 js/SenderStatistics.js   | 10 +++++-----
 js/StatStore.js          | 11 +++++++++--
 4 files changed, 24 insertions(+), 17 deletions(-)

-- 
2.20.1





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-02-19 14:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-02 13:03 [pmg-devel] [PATCH pmg-api/pmg-gui v3] allow / in local part of pmg-email-address Stoiko Ivanov
2021-02-02 13:03 ` [pmg-devel] [PATCH pmg-api v3 1/2] api: statistics: add common method for details Stoiko Ivanov
2021-02-11  9:15   ` [pmg-devel] applied: " Thomas Lamprecht
2021-02-02 13:03 ` [pmg-devel] [PATCH pmg-api v3 2/2] utils: allow '/' inside email address localpart Stoiko Ivanov
2021-02-11  9:15   ` [pmg-devel] applied: " Thomas Lamprecht
2021-02-02 13:03 ` [pmg-devel] [PATCH pmg-gui v3 1/1] statistics: use new api call for detailed stats Stoiko Ivanov
2021-02-19 13:59   ` [pmg-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal