Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable17] Allow inline styles for theming images #18580

Merged
merged 1 commit into from
Mar 5, 2020

Conversation

backportbot-nextcloud[bot]
Copy link

backport of #18140

@gary-kim gary-kim added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jan 1, 2020
@juliushaertl juliushaertl added 2. developing Work in progress and removed 4. to release Ready to be released and/or waiting for tests to finish labels Jan 2, 2020
@juliushaertl
Copy link
Member

Tests need adjustments:

1) OCA\Theming\Tests\Controller\ThemingControllerTest::testGetLogo
--
135 | Failed asserting that two objects are equal.
136 | --- Expected
137 | +++ Actual
138 | @@ @@
139 | - 'contentSecurityPolicy' => OCP\AppFramework\Http\EmptyContentSecurityPolicy Object &000000005a133c7e000000000d69fcce (
140 | - 'inlineScriptAllowed' => null
141 | + 'contentSecurityPolicy' => OCP\AppFramework\Http\ContentSecurityPolicy Object &000000005a133c5f000000000d69fcce (
142 | + 'inlineScriptAllowed' => false
143 | + 'evalScriptAllowed' => false
144 | + 'allowedScriptDomains' => Array &0 (
145 | + 0 => ''self''
146 | + )
147 | + 'inlineStyleAllowed' => true
148 | + 'allowedStyleDomains' => Array &1 (
149 | + 0 => ''self''
150 | + )
151 | + 'allowedImageDomains' => Array &2 (
152 | + 0 => ''self''
153 | + 1 => 'data:'
154 | + 2 => 'blob:'
155 | + )
156 | + 'allowedConnectDomains' => Array &3 (
157 | + 0 => ''self''
158 | + )
159 | + 'allowedMediaDomains' => Array &4 (
160 | + 0 => ''self''
161 | + )
162 | + 'allowedObjectDomains' => Array &5 ()
163 | + 'allowedFrameDomains' => Array &6 ()
164 | + 'allowedFontDomains' => Array &7 (
165 | + 0 => ''self''
166 | + 1 => 'data:'
167 | + )
168 | + 'allowedChildSrcDomains' => Array &8 ()
169 | + 'allowedFrameAncestors' => Array &9 (
170 | + 0 => ''self''
171 | + )
172 | + 'allowedWorkerSrcDomains' => Array &10 ()
173 | + 'allowedFormActionDomains' => Array &11 (
174 | + 0 => ''self''
175 | + )
176 | + 'reportTo' => Array &12 ()
177 | 'useJsNonce' => null
178 | - 'evalScriptAllowed' => null
179 | - 'allowedScriptDomains' => null
180 | - 'inlineStyleAllowed' => null
181 | - 'allowedStyleDomains' => null
182 | - 'allowedImageDomains' => null
183 | - 'allowedConnectDomains' => null
184 | - 'allowedMediaDomains' => null
185 | - 'allowedObjectDomains' => null
186 | - 'allowedFrameDomains' => null
187 | - 'allowedFontDomains' => null
188 | - 'allowedChildSrcDomains' => null
189 | - 'allowedFrameAncestors' => null
190 | - 'allowedWorkerSrcDomains' => null
191 | - 'allowedFormActionDomains' => null
192 | - 'reportTo' => null
193 |  
194 | /drone/src/apps/theming/tests/Controller/ThemingControllerTest.php:767
195 |  
196 | 2) OCA\Theming\Tests\Controller\ThemingControllerTest::testGetLoginBackground
197 | Failed asserting that two objects are equal.
198 | --- Expected
199 | +++ Actual
200 | @@ @@
201 | - 'contentSecurityPolicy' => OCP\AppFramework\Http\EmptyContentSecurityPolicy Object &000000005a133cf7000000000d69fcce (
202 | - 'inlineScriptAllowed' => null
203 | + 'contentSecurityPolicy' => OCP\AppFramework\Http\ContentSecurityPolicy Object &000000005a133ced000000000d69fcce (
204 | + 'inlineScriptAllowed' => false
205 | + 'evalScriptAllowed' => false
206 | + 'allowedScriptDomains' => Array &0 (
207 | + 0 => ''self''
208 | + )
209 | + 'inlineStyleAllowed' => true
210 | + 'allowedStyleDomains' => Array &1 (
211 | + 0 => ''self''
212 | + )
213 | + 'allowedImageDomains' => Array &2 (
214 | + 0 => ''self''
215 | + 1 => 'data:'
216 | + 2 => 'blob:'
217 | + )
218 | + 'allowedConnectDomains' => Array &3 (
219 | + 0 => ''self''
220 | + )
221 | + 'allowedMediaDomains' => Array &4 (
222 | + 0 => ''self''
223 | + )
224 | + 'allowedObjectDomains' => Array &5 ()
225 | + 'allowedFrameDomains' => Array &6 ()
226 | + 'allowedFontDomains' => Array &7 (
227 | + 0 => ''self''
228 | + 1 => 'data:'
229 | + )
230 | + 'allowedChildSrcDomains' => Array &8 ()
231 | + 'allowedFrameAncestors' => Array &9 (
232 | + 0 => ''self''
233 | + )
234 | + 'allowedWorkerSrcDomains' => Array &10 ()
235 | + 'allowedFormActionDomains' => Array &11 (
236 | + 0 => ''self''
237 | + )
238 | + 'reportTo' => Array &12 ()
239 | 'useJsNonce' => null
240 | - 'evalScriptAllowed' => null
241 | - 'allowedScriptDomains' => null
242 | - 'inlineStyleAllowed' => null
243 | - 'allowedStyleDomains' => null
244 | - 'allowedImageDomains' => null
245 | - 'allowedConnectDomains' => null
246 | - 'allowedMediaDomains' => null
247 | - 'allowedObjectDomains' => null
248 | - 'allowedFrameDomains' => null
249 | - 'allowedFontDomains' => null
250 | - 'allowedChildSrcDomains' => null
251 | - 'allowedFrameAncestors' => null
252 | - 'allowedWorkerSrcDomains' => null
253 | - 'allowedFormActionDomains' => null
254 | - 'reportTo' => null
255 |  
256 | /drone/src/apps/theming/tests/Controller/ThemingControllerTest.php:795
257 |  
258 | --

@juliushaertl juliushaertl self-assigned this Jan 2, 2020
@rullzer rullzer mentioned this pull request Jan 20, 2020
@rullzer
Copy link
Member

rullzer commented Jan 21, 2020

@juliushaertl ping

@kesselb
Copy link
Contributor

kesselb commented Feb 21, 2020

@juliushaertl 🏓

@rullzer rullzer mentioned this pull request Mar 2, 2020
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliushaertl
Copy link
Member

Tests fixed.

@juliushaertl juliushaertl added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Mar 5, 2020
@rullzer rullzer merged commit 2c3cef9 into stable17 Mar 5, 2020
@rullzer rullzer deleted the backport/18140/stable17 branch March 5, 2020 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants