Report any technical problems you discover and discuss solutions.

v3: upload file php check

  • jayaich
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
10 years 11 months ago #2966 by jayaich
v3: upload file php check was created by jayaich
Hello,

Not sure if this is a bug or not; came across it when looking for something else.

In file 'website_code/php/import/fileupload.php', line 30 shows:
Code:
if(!strpos($php_check,"<?PHP")){

However, if this is a check to see if the uploaded file has php in it, then surely it should be using 'stripos' - check the string case-independently?


John.

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #2971 by julten
Replied by julten on topic v3: upload file php check
Is it the case that stripos is PHP5, whereas strpos is an earlier version? I haven't made the change as our minimum requirements are php 4.3, but you are right: we shold check for lowercase as well.
The following user(s) said Thank You: jayaich

Please Log in or Create an account to join the conversation.

Moderators: ronmjultenJohnSmith
Time to create page: 0.144 seconds
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo