From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9])
	by lore.proxmox.com (Postfix) with ESMTPS id D49731FF38E
	for <inbox@lore.proxmox.com>; Tue, 28 May 2024 10:14:27 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 45C261092E;
	Tue, 28 May 2024 10:14:43 +0200 (CEST)
From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Date: Tue, 28 May 2024 10:13:41 +0200
Message-ID: <20240528081359.832986-1-c.heiss@proxmox.com>
X-Mailer: git-send-email 2.44.0
MIME-Version: 1.0
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.012 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [options.rs, sys.pm, whatwg.org, main.rs, utils.rs,
 proxmox-auto-installer.rs]
Subject: [pve-devel] [PATCH installer 0/7] use email regex from HTML spec
 for validation
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

This uses the regex for <input type="email" /> elements as defined in
the HTML spec to validate emails in the installer. That regex should be
a lot more robust than our current on and cover basically all cases of
email addresses that might be encountered in the while.

Also, patch #6 adds validation for the auto-installer `global.mailto`
option too, while at it.

Patches #1 through #4 are just small cleanups/fixes and may be applied
independently.

[0] https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address

Christoph Heiss (7):
  cargo: convert `anyhow` to workspace dependency
  tui: fix new clippy lint
  auto-installer: drop some unneeded `pub` modifiers
  auto-installer: print full anyhow message on failure
  tui: use email regex from HTML specification for validation
  auto-installer: validate `global.mailto` answer option
  proxinstall: use email regex from HTML specification for validation

 Cargo.toml                                    |  2 ++
 Proxmox/Makefile                              |  1 +
 Proxmox/Sys.pm                                |  9 ++++++
 proxinstall                                   |  3 +-
 proxmox-auto-install-assistant/Cargo.toml     |  2 +-
 proxmox-auto-installer/Cargo.toml             |  2 +-
 .../src/bin/proxmox-auto-installer.rs         |  2 +-
 proxmox-auto-installer/src/utils.rs           | 17 ++++++-----
 proxmox-chroot/Cargo.toml                     |  2 +-
 proxmox-fetch-answer/Cargo.toml               |  2 +-
 proxmox-installer-common/Cargo.toml           |  1 +
 proxmox-installer-common/src/options.rs       | 29 ++++++++++++++++++-
 proxmox-tui-installer/Cargo.toml              |  1 -
 proxmox-tui-installer/src/main.rs             | 22 +++++---------
 14 files changed, 65 insertions(+), 30 deletions(-)
 create mode 100644 Proxmox/Sys.pm

-- 
2.44.0



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel