توقف عمل Rich onebox

لاحظت أن الصندوق الواحد (onebox) لموقعي توقف عن العمل في منتدى Discourse الذي أزوره. كان يعمل في الإصدار 1.8.x، لكن المنتدى تم تحديثه الآن إلى الإصدار 1.9.3 ولم تعد صناديقي الواحدة تعمل. تحققت من try.discourse.org ووجدت نفس المشكلة. تبدو عناوين URL للصناديق الواحدة على النحو التالي:

يُرجع موقعي تضمين oembed التالي

{
  "version":"1.0",
  "type":"rich",
  "width":600,
  "height":400,
  "title":"metr",
  "html":"<iframe src=\"https://metr.at/r/CF1go?oembed=true\" width=\"600\" height=\"400\"
    frameborder=\"0\"></iframe>",
  "provider_name":"metr.at",
  "provider_url":"https://metr.at"
}

لقد راجعت سجل التعديلات (commit history) في مستودع onebox على GitHub ووجدت التعديل 407fd0b8d6d41956e2400efc1918ace255aecd37 بعنوان “الأمان: وضع iframes في بيئة معزولة (sandbox)، وتحويل الروابط النسبية إلى مطلقة”

هل يمكن أن يكون فشل صندوقي الواحد بسبب استخدام iframe وقضايا الأمان؟ هل هناك شيء يمكنني فعله؟

I suspect that it is the iframe. Can you remove it?

I can not remove the iframe because the whole onebox is the iframe. If I remove it, there will be nothing left.

إعجابَين (2)

Discourse 1.8 uses onebox 1.8.12 and the commit you referenced was already part of that version. So, it must be something else. If your problem is caused by changes to the onebox gem, it should be one of the 79 commits: https://github.com/discourse/onebox/compare/e9164ee70186f87d2f2197de37a3a43f1274a060...master

5 إعجابات

iframely is totally happy by the way http://iframely.com/debug?uri=https%3A%2F%2Fmetr.at%2Fr%2FCF1go

I think I found the problem

https://github.com/discourse/discourse/commit/d6b22e6cc1b19a5279774fbe3a0138caca7918ea

do I understand right, the iframe will not be oneboxed unless whitelisted in the forum settings?

3 إعجابات

That’s exactly right :+1:

4 إعجابات