[ 
https://issues.apache.org/jira/browse/ROL-2184?focusedWorklogId=1045545&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1045545
 ]

ASF GitHub Bot logged work on ROL-2184:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Oct/26 21:15
            Start Date: 03/Oct/26 21:15
    Worklog Time Spent: 10m 
      Work Description: snoopdave opened a new pull request, #205:
URL: https://github.com/apache/roller/pull/205

   Fixes [ROL-2184](https://issues.apache.org/jira/browse/ROL-2184).
   
   ## Summary
   
   Desktop images pasted or dragged into the rich text editor remain visible 
while editing but disappear from published entries because their `data:` 
sources are removed during rendering.
   
   This change converts PNG, JPEG, and GIF data images to Roller media files 
when uploads are available to the author. If uploads are disabled or the author 
cannot upload, it keeps validated images inline. Saving an older entry applies 
the same handling to images already in its text or summary.
   
   It also adds `weblog.inlineImages.preferInline` for operators who want 
inline storage even when uploads are available, limits inline content to 60,000 
UTF-8 bytes per field, permits validated data images through the HTML 
sanitizer, and updates bundled theme image policies and the user guide.
   
   ## Verification
   
   - `mvn -q -pl app -am -DskipTests compile` — passed
   - `git diff --check` — passed
   - Tests and browser verification were not run.
   
   ## Notes
   
   Custom themes with their own Content Security Policy need `data:` in 
`img-src` to display inline images.
   
   Supersedes #203, which targeted `master`.
   
   Targets `roller-6.1.x` for 6.1.7. It will be cherry-picked to `master` after 
the 6.1.7 release.




Issue Time Tracking
-------------------

    Worklog Id:     (was: 1045545)
    Time Spent: 0.5h  (was: 20m)

> Pasted desktop images disappear from published entries
> ------------------------------------------------------
>
>                 Key: ROL-2184
>                 URL: https://issues.apache.org/jira/browse/ROL-2184
>             Project: Apache Roller
>          Issue Type: Bug
>          Components: Media files / uploads, Themes and Macros, User Interface 
> - Weblog Editor
>            Reporter: David M. Johnson
>            Assignee: David M. Johnson
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Reported against 6.1.6.
> If you drag a desktop image into the rich text editor, it becomes a {{data:}} 
> image. It shows while you edit, but the published entry leaves it out: 
> rendering strips {{data:}} images, and the bundled themes' CSP blocks them. 
> Fix both paths:
> # *Upload (preferred).* When upload is available, upload new pasted or 
> dropped images as media files. Convert stored inline images the next time an 
> entry is saved. Leave remote images unchanged. Use Roller's existing checks 
> for upload permission, file type, size and quota.
> # *Inline fallback.* When upload is unavailable, or when the new global 
> "inline images" preference is set, store the image inline. Accept only 
> strictly validated PNG, JPEG and GIF data images, with a 60,000-byte field 
> limit.
> h3. Acceptance
> * New pastes and drops, and edits of old entries, produce working published 
> images on both paths. Check the draft and publish flows.
> * A failed upload, or an invalid or oversized inline image, shows a clear 
> message. It never silently publishes a missing image.
> * Valid inline images render in the bundled themes. Non-image data URLs and 
> active content stay blocked.
> * The docs say that custom themes with their own CSP must allow {{data:}} 
> under {{img-src}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to