Advertisement:

Author Topic: [HOWTO] Allow SMF 2.0.x to run in an iframe  (Read 1616 times)

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,242
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
[HOWTO] Allow SMF 2.0.x to run in an iframe
« on: January 11, 2019, 12:02:05 PM »
In this simple guide we will show how to allow SMF 2.0.x to run in an iframe.

Open your index.php in the root directory of your forum

Find
Code: [Select]
header('X-Frame-Options: SAMEORIGIN');
Change to
Code: [Select]
// header('X-Frame-Options: SAMEORIGIN');
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline live627

  • On Hiatus
  • SMF Hero
  • *
  • Posts: 5,620
  • Gender: Male
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: [HOWTO] Allow SMF 2.0.x to run in an iframe
« Reply #1 on: January 11, 2019, 10:31:57 PM »
Wouldn't this then open the door to clickjacking?
Try not to become a man of success, but rather try to become a man of value.
- Albert Einstein

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,190
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: [HOWTO] Allow SMF 2.0.x to run in an iframe
« Reply #2 on: January 12, 2019, 02:22:07 AM »
There are risks, but there are also valid usecases.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Online Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,159
  • Gender: Male
    • Kindred-999 on GitHub
Re: [HOWTO] Allow SMF 2.0.x to run in an iframe
« Reply #3 on: January 21, 2019, 10:49:34 AM »
personally, I think that iframes are outdated at this point.... with the various SSI functions from pretty much every site, why would you open yourself to the potential security issues?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Masterd

  • SMF Hero
  • ******
  • Posts: 3,917
  • Gender: Male
Re: [HOWTO] Allow SMF 2.0.x to run in an iframe
« Reply #4 on: February 02, 2019, 12:34:35 PM »
Wouldn't this then open the door to clickjacking?

It most certainly would. Iframes are an outdated and risky concept at this point.

Offline spiros

  • Language Moderator
  • SMF Hero
  • *
  • Posts: 1,732
  • Gender: Male
  • A different point of view
    • spiros.doikas on Facebook
    • doikas on LinkedIn
    • @greektranslator on Twitter
    • Greek Translation
Re: [HOWTO] Allow SMF 2.0.x to run in an iframe
« Reply #5 on: April 08, 2019, 01:00:43 PM »
Even better, define extra sites with Content-Security-Policy: frame-ancestors

https://www.simplemachines.org/community/index.php?topic=566974.msg4015060#msg4015060

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,242
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: [HOWTO] Allow SMF 2.0.x to run in an iframe
« Reply #6 on: April 08, 2019, 02:12:37 PM »
Learned something new.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline spiros

  • Language Moderator
  • SMF Hero
  • *
  • Posts: 1,732
  • Gender: Male
  • A different point of view
    • spiros.doikas on Facebook
    • doikas on LinkedIn
    • @greektranslator on Twitter
    • Greek Translation
Re: [HOWTO] Allow SMF 2.0.x to run in an iframe
« Reply #7 on: April 09, 2019, 09:23:42 AM »
Well, we all live and learn, took me a couple of hours searching to sort it out...