Hello Frank,<br><br>concerning input sanatization, especially on forms:<br>Maybe you should take a look at available form frameworks or start coding your own. Since I never did this on PHP (only WTForms for Python) I cannot direct you to one.<br>
You create a Form as a class, an XML file or any other representation and it is able to render it to HTML code. You later pass it the transmitted value and it will take on sanatization. This way it will always take care that your data is filtered like it should be.<br>
<br>Furthermore, you might want to write some kind of request processor that lets you retrieve data from $_GET, $_POST and so on but sanatizes it in a nice way. Of course, then everyone will have to use this framework, but it shouldn't be hard to fix and propose. Also, of course, provide a way to explicitly state that you want unfiltered input, for example if it is *desired* for someone to write HTML code.<br>
<br>Regards,<br>Florian<br><br><div class="gmail_quote">2012/6/29 Frank Karlitschek <span dir="ltr"><<a href="mailto:frank@owncloud.org" target="_blank">frank@owncloud.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi everybody,<br>
<br>
<br>
the main problem our users mention about ownCloud is the number of bugs we have. I think we have to be more careful in the future about code quality if we want that more users use our software to manage their important documents and data.<br>
We got a lot of bad press and feedback for ownCloud 4 and it took us several weeks to fix the major bugs in 4.0.4. We have to be way better in ownCloud 5.<br>
<br>
Robin, Thomas and others are working on automated unit tests. This will help us a bit in the future.<br>
But automated test have only a limited effectivity in complex client/server/web environments like ours.<br>
So every developer is full responsible for the bugs and security problems a commit might introduce. You canīt rely on a unit test or a different developer or user to find and fix your stuff.<br>
<br>
A few important rules:<br>
<br>
- Test your code before commit!<br>
- Only backport important and fully tested bugfixes to stable4<br>
- Switch PHP notices on and have a look at the Apache error log regularly.<br>
- Test you code before commit!!<br>
- Do complex stuff in branches and only merge when fully working<br>
- Respect the coding guidelines <a href="http://owncloud.org/dev/contribute/" target="_blank">http://owncloud.org/dev/contribute/</a><br>
- I suggest that developers run master so that we are sure that it is always usable.<br>
- Use JS debugger like Firebug to catch JS errors.<br>
- Test you code before commit!!<br>
- Always sanitize user data to prevent XSS or CSRF security problems.<br>
- Always write documentation for your classes/functions.<br>
- Test your code before commit!!!!<br>
- And please test your code before commit!<br>
<br>
<br>
Thanks a lot!<br>
<br>
Frank<br>
<br>
<br>
_______________________________________________<br>
Owncloud mailing list<br>
<a href="mailto:Owncloud@kde.org">Owncloud@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/owncloud" target="_blank">https://mail.kde.org/mailman/listinfo/owncloud</a><br>
</blockquote></div><br>