Commit 512769b
committed
fix(theming): fix broken custom images introduced in 32.0.9
Three bugs were introduced by the backport of #55132 (PR #58224):
1. ImageManager::getImage() incorrectly tried to convert any uploaded
raster image (PNG, JPEG) to SVG when imagick SVG support was available.
Imagick can read SVGs but reliably fails writing raster→SVG, causing
an ImagickException that silently fell through to bug 2.
2. ThemingController::getImage() changed Content-Type from the config-
stored MIME to $file->getMimeType(). The original stored file has no
extension (named "logo", not "logo.png"), so detectPath() returned
application/octet-stream, causing browsers to not render the image.
3. ImageManager::delete() cleaned up logo and logo.png but not logo.svg,
leaving stale SVG conversions that would be served after image updates.
Fixes #60146
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>1 parent 57a2630 commit 512769b
4 files changed
Lines changed: 101 additions & 42 deletions
File tree
- apps/theming
- lib
- Controller
- tests
- Controller
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
376 | 382 | | |
377 | 383 | | |
378 | 384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
113 | 96 | | |
114 | 97 | | |
115 | 98 | | |
| |||
120 | 103 | | |
121 | 104 | | |
122 | 105 | | |
123 | | - | |
| 106 | + | |
124 | 107 | | |
125 | 108 | | |
126 | 109 | | |
127 | 110 | | |
128 | 111 | | |
129 | | - | |
130 | 112 | | |
131 | 113 | | |
132 | 114 | | |
| |||
214 | 196 | | |
215 | 197 | | |
216 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
217 | 205 | | |
218 | 206 | | |
219 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
672 | 695 | | |
673 | 696 | | |
674 | 697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 82 | + | |
86 | 83 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 84 | + | |
| 85 | + | |
91 | 86 | | |
92 | 87 | | |
93 | 88 | | |
94 | 89 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 90 | | |
103 | 91 | | |
104 | 92 | | |
| |||
149 | 137 | | |
150 | 138 | | |
151 | 139 | | |
152 | | - | |
153 | 140 | | |
154 | | - | |
155 | | - | |
| 141 | + | |
| 142 | + | |
156 | 143 | | |
157 | 144 | | |
158 | 145 | | |
159 | 146 | | |
160 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
161 | 203 | | |
162 | 204 | | |
163 | 205 | | |
| |||
0 commit comments