Problem:
It's not possible to insert correct image using Basic HTML text format.

enable restrict

Solution
Disable Restrict images to this site checkbox on filter settings, the same as it's done for Full HTML text format.

enable restrict

CommentFileSizeAuthor
disable-restrict.png78.74 KBribel
enable-restrict.png113.65 KBribel

Comments

ribel created an issue. See original summary.

ribel’s picture

Status: Active » Needs review

Here is PR, which fixes this issue: https://github.com/goalgorilla/open_social/pull/549

wim leers’s picture

Title: Disable Restrict images for Basic HTML text format » Disable Restrict images for Basic HTML text format because it does not allow remote images

https://github.com/goalgorilla/open_social/pull/549 contains more information:

Try to upload image using Basic HTML text format at any NOT local site

(Emphasis mine.)

This is reducing security of Open Social. It also increases vulnerability to link rot and therefore broken content over a longer period of time.

If I were a maintainer of Open Social, I would not accept this. You'd still be free to change the configuration, but I'd recommend against this.

ribel’s picture

Wim Leers, thank you for bringing this to the attention.

I was treating the symptom, not the disease. Because the problem was with local images, not remote.

Now I found that this issue was caused by Drupal Core issue: https://www.drupal.org/node/2528214

In PR, I have reverted Basic HTML text format settings and applied patch to core from the issue.

Please advise if that's correct.

Thanks!

wim leers’s picture

Title: Disable Restrict images for Basic HTML text format because it does not allow remote images » [PP-1] Disable Restrict images for Basic HTML text format because it does not allow remote images

Yes, #2528214: "Restrict images to this site" blocks image style derivatives is then likely the cause of your problems, and is indeed the proper fix! :)

wim leers’s picture

Status: Needs review » Postponed
maikelkoopman’s picture

Status: Postponed » Fixed

Will released in version 1.6

  • ribel committed 109aa3b on 8.x-1.x
    Issue #2910585 by ribel: Disable Restrict images for Basic HTML text...
  • ribel committed 7a7aae1 on 8.x-1.x
    Issue #2910585 by ribel: Add patch "Restrict images to this site blocks...
  • maikelkoopman authored e15c172 on 8.x-1.x
    Merge pull request #549 from goalgorilla/feature/2910585-disable-image-...
wim leers’s picture

Status: Fixed » Needs work

@maikelkoopman I think this is a very bad idea. You've just enabled hotlinking of images. Which means:

This is reducing security of Open Social. It also increases vulnerability to link rot and therefore broken content over a longer period of time.

maikelkoopman’s picture

Wim, we have added the patch form the 2528214 https://www.drupal.org/files/issues/image_restrict_image_styles-2528214-.... So the option to disable Restrict images for Basic HTML is not enabled now. We have to go forward with a solution, because it is blocking users from uploading images in the ckeditor.
https://github.com/goalgorilla/open_social/pull/549/files

In your previous comment you said 'and is indeed the proper fix!", I was assuming this is okay to move forward?

wim leers’s picture

The proper fix is to get #2528214: "Restrict images to this site" blocks image style derivatives fixed in core, and in the mean time, the proper solution is to include that patch. You did that in https://www.drupal.org/commitlog/commit/60333/7a7aae1d1db4354b3e4412b3be... (great!), but you also committed https://www.drupal.org/commitlog/commit/60333/109aa3b5a495aede2ef0c9cac7... (bad!).

I think perhaps https://www.drupal.org/commitlog/commit/60333/109aa3b5a495aede2ef0c9cac7... was an accidental commit then? :)

bramtenhove’s picture

Status: Needs work » Fixed

Hi Wim,

The changes in 109aa3b5a495aede2ef0c9cac7b29d8c812b57d1 have been undone in 7a7aae1d1db4354b3e4412b3be5cff5fd48edd0a.

We do not squash the commits when merging pull requests on GitHub, this is probably where the confusion comes from.

The final diff that was committed is https://github.com/goalgorilla/open_social/pull/549.patch. Hope that clears everything up ;)

wim leers’s picture

Eh … ok. This is exactly why you need to squash commits. All good then, but your commit history is now super confusing and pretty useless (since it first makes a change and then undoes it).

It's fine to not squash commits that touch different areas, to have logical commits, but these aren't remotely logical.

Anyway: 👍

bramtenhove’s picture

I see your point.

@jochemvn mentioned we can start squashing commits when a PR on GitHub is closed.

Anyway, thanks for raising the point! I’ll throw it in the group.

wim leers’s picture

Cool :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.