/    Sign up×
Community /Pin to ProfileBookmark

PHP is a security risk?

Hi. I am developing a new project at hexuk.com

I was recently attaching a file to a post of mine in our magento forum. I had a warning halt my work stating that PHP files cannot be attachments due to security risks.

For now I am highlighting the scripting within the files and posting them within the

[code][/code]

tags.

I am guessing this is the only way to go for now and its no real problem. Has anyone got more information into how this can be bypassed and what the risks actually are?

Thanks, Mark Birchall (Hex UK)

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogJul 14.2010 — Presumably the risk is if a PHP script is uploaded to a web host with a .php suffix -- or any other suffix which that host would treat as a PHP file -- then a malicious user could upload a script that does nasty things, and then access it via URL to trigger it. If you just want to upload a file to a forum so that the source code can be viewed/downloaded, the quickest work-around would be to rename it with a .txt file name suffix so that it's treated as a plain text file. Alternatively, some web servers are configured to display files with a .php[b]s[/b] suffix to show the source code instead of parsing it as PHP, in which case you could either give it that suffix, or alter the forum code to rename a .php file as .phps.
Copy linkTweet thisAlerts:
@hexukauthorJul 14.2010 — Thanks for the reply. Nice to have a clearer insight into this issue.
×

Success!

Help @hexuk spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...