{"action":"created","issue":{"url":"https://api.github.com/repos/s9y/Serendipity/issues/342","labels_url":"https://api.github.com/repos/s9y/Serendipity/issues/342/labels{/name}","comments_url":"https://api.github.com/repos/s9y/Serendipity/issues/342/comments","events_url":"https://api.github.com/repos/s9y/Serendipity/issues/342/events","html_url":"https://github.com/s9y/Serendipity/issues/342","id":79041270,"number":342,"title":"can we securely check mod_rewrite before allowing to use as config option?","user":{"login":"ophian","id":1105372,"avatar_url":"https://avatars.githubusercontent.com/u/1105372?v=3","gravatar_id":"","url":"https://api.github.com/users/ophian","html_url":"https://github.com/ophian","followers_url":"https://api.github.com/users/ophian/followers","following_url":"https://api.github.com/users/ophian/following{/other_user}","gists_url":"https://api.github.com/users/ophian/gists{/gist_id}","starred_url":"https://api.github.com/users/ophian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ophian/subscriptions","organizations_url":"https://api.github.com/users/ophian/orgs","repos_url":"https://api.github.com/users/ophian/repos","events_url":"https://api.github.com/users/ophian/events{/privacy}","received_events_url":"https://api.github.com/users/ophian/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/s9y/Serendipity/labels/discuss","name":"discuss","color":"bfd4f2"},{"url":"https://api.github.com/repos/s9y/Serendipity/labels/enhancements","name":"enhancements","color":"f7c6c7"}],"state":"open","locked":false,"assignee":{"login":"garvinhicking","id":273326,"avatar_url":"https://avatars.githubusercontent.com/u/273326?v=3","gravatar_id":"","url":"https://api.github.com/users/garvinhicking","html_url":"https://github.com/garvinhicking","followers_url":"https://api.github.com/users/garvinhicking/followers","following_url":"https://api.github.com/users/garvinhicking/following{/other_user}","gists_url":"https://api.github.com/users/garvinhicking/gists{/gist_id}","starred_url":"https://api.github.com/users/garvinhicking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garvinhicking/subscriptions","organizations_url":"https://api.github.com/users/garvinhicking/orgs","repos_url":"https://api.github.com/users/garvinhicking/repos","events_url":"https://api.github.com/users/garvinhicking/events{/privacy}","received_events_url":"https://api.github.com/users/garvinhicking/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-05-21T15:20:04Z","updated_at":"2015-05-21T17:56:24Z","closed_at":null,"body":"Regarding this thread (http://board.s9y.org/viewtopic.php?f=2&t=20395) and some others we had in the past, wouldn't it be worth to either write\r\n```\r\n<IfModule mod_rewrite.c>\r\n\r\n  # Turn on\r\n  RewriteEngine on\r\n\r\n  # Conditions and Rules\r\n  RewriteCond ...\r\n  RewriteRule ...\r\n  ...\r\n\r\n</IfModule>\r\n````\r\nto both of the rewrite tpls\r\nhttps://github.com/s9y/Serendipity/blob/master/include/tpl/htaccess_rewrite.tpl\r\n\r\nor check this via `in_array('mod_rewrite', apache_get_modules());` for Apache modules or `strpos(shell_exec('/usr/local/apache/bin/apachectl -l'), 'mod_rewrite') !== false` for CGI usage or any other check for other non-Apache Servers, before we allow to set mod_rewrite per option?\r\n\r\nI never use other than moduled apaches, so I can't really judge this. This all to avoid totally blocked Serendipity installations. Are we able to secure this option set to mod_rewrite a little more?"},"comment":{"url":"https://api.github.com/repos/s9y/Serendipity/issues/comments/104371601","html_url":"https://github.com/s9y/Serendipity/issues/342#issuecomment-104371601","issue_url":"https://api.github.com/repos/s9y/Serendipity/issues/342","id":104371601,"user":{"login":"ophian","id":1105372,"avatar_url":"https://avatars.githubusercontent.com/u/1105372?v=3","gravatar_id":"","url":"https://api.github.com/users/ophian","html_url":"https://github.com/ophian","followers_url":"https://api.github.com/users/ophian/followers","following_url":"https://api.github.com/users/ophian/following{/other_user}","gists_url":"https://api.github.com/users/ophian/gists{/gist_id}","starred_url":"https://api.github.com/users/ophian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ophian/subscriptions","organizations_url":"https://api.github.com/users/ophian/orgs","repos_url":"https://api.github.com/users/ophian/repos","events_url":"https://api.github.com/users/ophian/events{/privacy}","received_events_url":"https://api.github.com/users/ophian/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T17:56:24Z","updated_at":"2015-05-21T17:56:24Z","body":"I assume we cannot do this singulary per htaccess, since we request the config set mod_rewrite option in some other places too and trust its value working. The IfModule would just not force an immediate accessible error."}}