Repository navigation
Installer fixes: Wi-Fi validation, HTTPS, system disk check / Kurulum düzeltmeleri: Wi-Fi denetimi, HTTPS, sistem diski kontrolü - #4
Open
FurkanKY wants to merge 3 commits into
Conversation
The old check compared device names as text, so on a Pi booting from NVMe (root on /dev/nvme0n1p2) passing /dev/nvme0n1p1 was not caught and the boot partition could be formatted. Compare physical disks instead, and stop if the system disk cannot be determined.
install.sh piped d.iiab.io/install.txt into a root shell over plain HTTP. The same file is served over HTTPS.
- Reject passwords outside 8-63 printable ASCII characters. Longer ones
were accepted and the hotspot never came up ("invalid WPA passphrase
length").
- Reject ", \, {{, {% and {# instead of silently removing ". They break
the YAML string or Ansible templating, and a silently changed password
cannot be used to join.
- Read the password as typed (read stripped leading/trailing spaces) and
reject leading or trailing spaces.
- Check the network name against the 32-byte SSID limit.
- Ask for the password twice, since it is typed hidden.
This was referenced Nov 1, 2026
This was referenced Nov 2, 2026
Owner
|
Emeğine sağlık, özellikle sistem diskinin formatlanma ihtimali gözümden kaçmıştı, iyi ki yakalamışsın. #10'la benzer değişiklikler var, ikisinden birini alacağım. Pi'de sıfırdan kurulum yapıp deneyeceğim, sorun yoksa merge ederim. Thanks a lot, I had totally missed that the system disk could get formatted, glad you caught it. There's some overlap with #10 so I'll pick one of them. I'll do a fresh install on the Pi and merge if it works. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
English · Türkçe
English
Three small installer fixes. Each one is a separate commit, so any of them can be dropped.
1. Wi-Fi name and password are validated before they are written (
install.sh)"in the password was silently removed:abc"defghwas saved asabcdefgh, so the user could not join with the password they typed. Now",\,{{,{%and{#are rejected with a message instead (they break the YAML string or Ansible templating).read. The password is now read as typed, and leading or trailing spaces are rejected with a message.2. The Internet-in-a-Box installer is downloaded over HTTPS (
install.sh)curl d.iiab.io/install.txt | bashused plain HTTP and runs as root.https://d.iiab.io/install.txtserves the same file.3. The system disk check also catches partitions (
scripts/setup-ssd.sh)The old check compared device names as text. On a Pi 5 booting from NVMe (root on
/dev/nvme0n1p2), passing/dev/nvme0n1p1was not caught, and the boot partition could be formatted. Now the script finds the physical disk of both the target and/(vialsblk PKNAME) and refuses if they are the same. If the system disk cannot be determined, it stops instead of guessing. This includes an overlay (read-only) root, where/is not a block device; there the script now stops with a message.Testing
bash -nand ShellCheck (-S warning) are clean on both files, apart from one warning on an unchanged line insetup-ssd.sh.local_vars.yml, and the disk check with SD boot, NVMe boot, a USB disk and a device-mapper root (lsblkwas stubbed).Türkçe
Kurulumda üç küçük düzeltme. Her biri ayrı bir commit, istenmeyen çıkarılabilir.
1. Wi-Fi adı ve şifresi yazılmadan önce denetleniyor (
install.sh)"sessizce siliniyordu:abc"defgh,abcdefgholarak kaydediliyordu ve kullanıcı yazdığı şifreyle bağlanamıyordu. Artık",\,{{,{%ve{#bir mesajla reddediliyor (YAML'ı ya da Ansible'ı bozuyorlar).readtarafından sessizce siliniyordu. Şifre artık yazıldığı gibi okunuyor; başta ya da sonda boşluk varsa bir mesajla reddediliyor.2. Internet-in-a-Box kurulum dosyası HTTPS ile indiriliyor (
install.sh)curl d.iiab.io/install.txt | bashşifresiz HTTP kullanıyordu ve root olarak çalışıyor.https://d.iiab.io/install.txtaynı dosyayı veriyor.3. Sistem diski kontrolü bölümleri de yakalıyor (
scripts/setup-ssd.sh)Eski kontrol aygıt adlarını yazı olarak karşılaştırıyordu. NVMe'den açılan bir Pi 5'te (kök
/dev/nvme0n1p2)/dev/nvme0n1p1verilirse yakalanmıyor, açılış bölümü biçimlendirilebiliyordu. Artık betik hedefin ve/'nin fiziksel diskini (lsblk PKNAME) bulup aynıysa reddediyor. Sistem diski belirlenemezse tahmin etmek yerine duruyor. Buna salt-okunur (overlay) kök de dahil: orada/bir blok aygıtı değil ve betik artık bir mesajla duruyor.Test
bash -nve ShellCheck (-S warning) temiz; yalnızcasetup-ssd.sh'te değiştirilmemiş bir satırda bir uyarı var.local_vars.yml'e yazan soru akışının tamamı ve SD'den açılış, NVMe'den açılış, USB disk ve device-mapper kökü senaryolarıyla disk kontrolü olmak üzere 37 durum (lsblktaklit edildi).