Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. No offense, but how is that piece of information relevant to the matter at hand?
  2. http://dev.mysql.com/doc/refman/5.1/en/select.html The WHERE clause comes before the ORDER BY clause.
  3. Are you talking about when the data is in the database? It has no effect there. It's only so characters that have special meaning in an SQL query will not mess up the query when you use them. Say I want to insert John in a table: INSERT INTO table (something) VALUES ('John'); That works well, but if I want John's we'll get in trouble: INSERT INTO table(something) VALUES ('John's'); In this case, the single quote has a special meaning in the sense that it's a string delimiter. Thus it has to be escaped.
  4. http://www.phpfreaks.com/tutorial/basic-pagination You sure seem to need a lot of things ASAP. Maybe you should pay someone if you're in such a hurry.
  5. Try this: ... ORDER BY MONTH(user_birthdate), DAY(user_birthdate);
  6. Then you are double escaping it. Look through your code and see if you are running it through an escaping function twice. Your database is not vulnerable to XSS. There are different contexts in which data might appear. In an SQL context you would escape it for SQL. In an HTML context you would escape it in another way (and yet another way in e.g. JSON).
  7. I assume you are talking about in a URL? Try urlencode.
  8. Ah yeah sorry, I forgot to escape the parentheses. Try this: $string = preg_replace('#eval\(base64_decode\("[0-9a-zA-Z+/=]+"\)\);#', '', $string);
  9. Cool story. Thanks for letting us know.
  10. http://ispconfig.org/documentation.htm
  11. Using regex would be fairly straightforward because a base64 encoded string will use a finite set of characters. $string = preg_replace('#eval(base64_decode("[0-9a-zA-Z+/=]+");#', '', $string);
  12. $string = preg_replace('#<p>\s*(.*?)\s*</p>#i', '<p>$1</p>', $string); $string = preg_replace('#<p>\d+</p>#', '', $string);
  13. I'd like to see you do that
  14. Time. What do you mean by 'an attached patch'? A solution to the problem? Assuming their bug tracker allows you to attach files (like you can on this forum), you could attach a file that is patched (a version of the file where you fixed the bug), or better yet a diff.
  15. Maybe you should check out what var_dump does
  16. If you use open source libraries/frameworks, that's not entirely true. What's preventing you from creating a bug report with an attached patch to projects like jQuery, Zend Framework, PHPUnit or Doctrine? All of these four are pretty large projects, so they're being overlooked by a lot of people and tested (security/performance/stability) in real environments by a lot of people. It'll likely be better than what you can churn out, and it'll save you a lot of time. You just have to be careful with what you choose to use. Also, it's no different than if there is a bug in PHP itself. Who do you then turn to? Right, the PHP devs.
  17. We cannot really tell. You would check the length immediately before inserting it into the database. It is probably doing some other sort of validation during the form processing. If you have absolutely no experience with programming whatsoever, you should start a simpler project though.
  18. The PHP documentation team can. is_dir is_file
  19. if (strlen($string) > 140) { echo 'too long'; } Then remove the part that makes it moderated.
  20. I disagree. What if someone else wants to?
  21. lol (for real).
  22. How about error handling?
  23. Do you have error reporting on?
  24. I suppose you can do this: return strpos($string, 'No <b><a href="http://dmoz.org/">Open Directory Project</a></b> results found') !== false; Then it'll return false if there is no listing for that domain.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.