CUTCODEDOWN
Minimalist Semantic Markup

Welcome Guest
Please Login or Register

If you have registered but not recieved your activation e-mail in a reasonable amount of time, or have issues with using the registration form, please use our Contact Form for assistance. Include both your username and the e-mail you tried to register with.

Author Topic: Order, Deny syntax deprecated  (Read 36 times)

durangod

  • Sr. Member
  • ****
  • Posts: 407
  • Karma: +5/-0
  • Weebles Wobble - but they dont fall down!
Order, Deny syntax deprecated
« on: 24 Mar 2024, 04:51:24 pm »
I just found this one of the phpbb htaccess files, i had no idea it was deprecated.  I dont often look at apache release notes, i mean who really does ya know, i guess maybe i should start doing so.   But otherwise unless there is an error how would anyone know, its not advertised. 

Code: [Select]
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
Order Allow,Deny
Deny from All
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from All
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</IfModule>


Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 1052
  • Karma: +188/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Order, Deny syntax deprecated
« Reply #1 on: 24 Mar 2024, 09:54:10 pm »
Classic example of why I think the whole allow,deny garbage was needlessly complex and convoluted, and why the people who go "wah wah but security in my subdirectories" wouldn't know actual security if it bit them in the ass.

My "one index" approach effectively negating that particular worry, my not allowing sub .php files to output anything client-side if called directly further making it silly, and if I REALLY needed to do it, I'd create a 404.php in the offending directory and use a rewriterule to redirect all requests to it.

Instead of dicking around phpBB style like it's still 2000 and PHP 4 still needed to be supported.
We are all, we are all, we are all FRIENDS! For today we're all brothers, tonight we're all friends. Our moment of peace in a war that never ends.

durangod

  • Sr. Member
  • ****
  • Posts: 407
  • Karma: +5/-0
  • Weebles Wobble - but they dont fall down!
Re: Order, Deny syntax deprecated
« Reply #2 on: 25 Mar 2024, 01:58:52 am »
I try not to display any output but errors and i am even trying to convert that design to only do so in the html file.   But i really like your process for that... :)  expecially the 404 use.   

 

SMF spam blocked by CleanTalk

Advertisement