Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Report any technical problems you discover and discuss solutions.
  • Page:
  • 1

TOPIC:

v3: upload file php check 9 years 3 months ago #2966

  • jayaich
  • jayaich's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 82
  • Thank you received: 5
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:
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 Inloggen or Create an account to join the conversation.

v3: upload file php check 9 years 3 months ago #2971

  • julten
  • julten's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 137
  • Thank you received: 18
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 Inloggen or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ronmjultenJohnSmith
Time to create page: 0.043 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search