Skip to content

Commit cb4e0c8

Browse files
committed
Merge remote-tracking branch 'upstream/SLE-15-SP7' into huha-regcode-leak-master
2 parents 7215d22 + 7436277 commit cb4e0c8

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

package/yast2.changes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
-------------------------------------------------------------------
2+
Tue Oct 14 13:40:00 UTC 2025 - Stefan Hundhammer <shundhammer@suse.com>
3+
4+
- save_y2logs: Sanitize confidential data in macro_inst_initial.ycp
5+
(bsc#1251768)
6+
- 5.0.16
7+
18
-------------------------------------------------------------------
29
Fri Jul 18 09:38:48 UTC 2025 - Ladislav Slezák <lslezak@suse.com>
310

package/yast2.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
Name: yast2
20-
Version: 5.0.15
20+
Version: 5.0.16
2121

2222
Release: 0
2323
Summary: YaST2 Main Package

scripts/save_y2logs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,26 @@ if [ -f /etc/install.inf ]; then
9191
LIST_TMP="$LIST_TMP install.inf"
9292
fi
9393

94+
MACRO_INST=/var/log/YaST2/macro_inst_initial.ycp
95+
96+
if [ -f $MACRO_INST ]; then
97+
# bsc#1251768: Don't leak registration code or e-mail to the y2logs tarball
98+
#
99+
# UI::ChangeWidget( `id (`email), `Value, "kilroy@example.com" ); // YInputField ...
100+
# UI::ChangeWidget( `id (`reg_code), `Value, "MY-REG-CODE" ); // YInputField ...
101+
#
102+
# -->
103+
#
104+
# UI::ChangeWidget( `id (`email), `Value, [confidential] ); // YInputField ...
105+
# UI::ChangeWidget( `id (`reg_code), `Value, [confidential] ); // YInputField ...
106+
#
107+
# Intentionally doing this in-place in the real /var/log/YaST2/macro_inst_initial.ycp
108+
109+
sed -i -E \
110+
-e '/id.*(reg_code|email).*YInputField/s/(Value,\s)[^)]+(.*$)*/\1[confidential] \2/' \
111+
$MACRO_INST
112+
fi
113+
94114
# if storing logs at the end of installation after bootloader fail, try to store pbl log from target system
95115
if [ -f /mnt/var/log/pbl.log ]; then
96116
cp /mnt/var/log/pbl.log $TMPDIR/pbl-target.log

0 commit comments

Comments
 (0)