Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 26, 2012, 04:36:27 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter
hier
und auf unserer
neuen Webseite
.
155544
Posts in
21714
Topics by
7736
Members
Latest Member:
chris85
WebsiteBaker Community Forum
English
Help & Support
(Moderators:
Argos
,
badknight
)
2.8.2 release projection?
Pages: [
1
]
2
Go Down
Author
Topic: 2.8.2 release projection? (Read 2892 times)
rabsaul
Offline
Posts: 263
2.8.2 release projection?
«
on:
January 07, 2011, 01:39:54 AM »
I've been waiting quite anxiously for the release of 2.8.2 ever since the security announcement here:
http://www.websitebaker2.org/forum/index.php/topic,20318.0.html
... any word on when a stable and secure version of 2.8.2 will be available?
Thanks!
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: 2.8.2 release projection?
«
Reply #1 on:
January 07, 2011, 02:42:36 AM »
Hi,
based on the same post above , I was looking for various solutions to protect the wb and my current and modules I am currently working on from CRFS requests.
since it is announced that solution will be included in 2.8.2, could you reveal or point to the code for us less patient..
If it is not possible, could you please check this:
http://crisp.tweakblogs.net/blog/3928/csrf-protection-with-self-validating-tokens.html
and tell me is this good and safe solution as I am not experienced enough to judge myself..
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
testör
Guest
Re: 2.8.2 release projection?
«
Reply #2 on:
January 07, 2011, 09:41:05 AM »
The latest 2.8.2 RC3
http://www.websitebaker2.org/en/download/latest-version.php
has fixed nearly all known security flaws, except a "complete" CSRF fix. But it's only a matter of weeks when there's a stable 2.8.2 - a (unfortunately German only) blog about securing 2.8.2 is here:
http://wbdemo.heysoft.de/pages/de/wb-core-entwicklung.php
Logged
BlackBird
AddOn Development
Offline
Posts: 2069
Re: 2.8.2 release projection?
«
Reply #3 on:
January 07, 2011, 11:13:31 AM »
As a workaround for older WB releases, you may try sseq-lib.
http://www.erich-kachel.de/?page_id=133
This can secure WB with only two includes. ("Global" index.php an admin/index.php)
To be a bit clearer (as some people don't understand this, see below): This will help to improve the security of older WB installations without having to change each and every file and/or module. With some more work, you can improve the security even more.
See also:
http://www.erich-kachel.de/?p=612
«
Last Edit: January 07, 2011, 02:21:21 PM by BlackBird
»
Logged
Alle großen Veränderungen beginnen im Kleinen
testör
Guest
Re: 2.8.2 release projection?
«
Reply #4 on:
January 07, 2011, 11:45:14 AM »
Quote from: BlackBird on January 07, 2011, 11:13:31 AM
As a workaround for older WB releases, you may try sseq-lib.
http://www.erich-kachel.de/?page_id=133
This can secure WB with only two includes. ("Global" index.php an admin/index.php)
No - not if you want to avoid CSRF. You have to include it in any form:
http://www.erich-kachel.de/?p=669
In fact, it's the same as ftan (/include/class.secureform.php), that's included in 2.8.2 RCs.
Logged
BlackBird
AddOn Development
Offline
Posts: 2069
Re: 2.8.2 release projection?
«
Reply #5 on:
January 07, 2011, 11:52:11 AM »
Read it again. And again. And if you think you have understood it - read again. Maybe, after some reading, you will ... no, you won't. Forget it.
Logged
Alle großen Veränderungen beginnen im Kleinen
testör
Guest
Re: 2.8.2 release projection?
«
Reply #6 on:
January 07, 2011, 12:34:53 PM »
Quote from: BlackBird on January 07, 2011, 11:52:11 AM
Read it again. And again. And if you think you have understood it - read again. Maybe, after some reading, you will ... no, you won't. Forget it.
You haven't understood what CSRF means, have you? It's impossible to secure an installation with two includes - and even Erich Kachel says it many times. But perhaps everybody that secures his/her installations against CSRF has failed and doing all the wrong way.
Logged
BlackBird
AddOn Development
Offline
Posts: 2069
Re: 2.8.2 release projection?
«
Reply #7 on:
January 07, 2011, 01:12:17 PM »
No, you didn't understand. Thank you for confirming.
Logged
Alle großen Veränderungen beginnen im Kleinen
testör
Guest
Re: 2.8.2 release projection?
«
Reply #8 on:
January 07, 2011, 01:19:36 PM »
Quote from: BlackBird on January 07, 2011, 01:12:17 PM
No, you didn't understand. Thank you for confirming.
Ok. Then let me know, how "Requiring a secret, user-specific token in all form submissions and side-effect URLs prevents CSRF; the attacker's site cannot put the right token in its submissions" from
http://shiflett.org/articles/cross-site-request-forgeries
is possible without touching the "form" HTML code.
Another quote from
http://www.erich-kachel.de/?p=730
, German only "Die Sicherheitsbiblioth
ek SSEQ-LIB stellt zum Schutz gegen CSRF Tokens bereit,
die in Links und Formulare eingebaut
und bei der Ausführung überprüft werden."
Then compare it with
http://project.websitebaker2.org/projects/websitebaker/repository/entry/branches/2.8.x/wb/framework/SecureForm.php
(2.8.2 branch!).
Logged
Hans Toolbox
Offline
Posts: 910
Re: 2.8.2 release projection?
«
Reply #9 on:
January 07, 2011, 01:37:00 PM »
Yep, und deshalb wird bei meinen Anwendern SSEQ-LIB nur bei bekannt unsicheren Modulen eingesetzt, bis zur Beseitigung der Fehler und anderer Unzulänglichkeiten.
1.) müssen die Fehler bekannt sein, um diese "maskieren" zu können (SEQ_SANITIZE)
2.) ist die Verwendung der SSEQ-LIB tatsächlich als Übergangslösung bis zur Beseitigung des "eigentlichen" Problems zu sehen, also wenn es z.B. "unersetzliche" Module im laufenden Betrieb betrifft.
Translate
«
Last Edit: January 07, 2011, 01:57:55 PM by Hans Toolbox
»
Logged
[Die Beleidigung gegenüber mir wurde durch mich gelöscht, User wurde von mir ausgeschlossen - kweitzel]
BlackBird
AddOn Development
Offline
Posts: 2069
Re: 2.8.2 release projection?
«
Reply #10 on:
January 07, 2011, 01:54:01 PM »
Genau, Hans, Du hast es erfaßt. Michael schnallt es nicht.
Logged
Alle großen Veränderungen beginnen im Kleinen
testör
Guest
Re: 2.8.2 release projection?
«
Reply #11 on:
January 07, 2011, 02:04:57 PM »
Quote from: BlackBird on January 07, 2011, 01:54:01 PM
Genau, Hans, Du hast es erfaßt. Michael schnallt es nicht.
I haven't anything against Hans post but it's offtopic. The thread is called "2.8.2 release projection" and linked to the CSRF announcement and not "what can I do against a module that I think could be dangerous". I'm quitting writing in that topic, it's helpless.
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: 2.8.2 release projection?
«
Reply #12 on:
January 07, 2011, 02:16:09 PM »
Hi all,
I didnt expect to flame a big discussion here. I reviewed framework/SecureForm.php file. I see that there is a lot hard work there, and I just want an opinion weather to use FTAN or to use the script posted on link in second post from top, since I can notice that script is a bit more complex (tokens interacts with database)
Again to underline that I only want help and opinion, and not fight
And please, write in english so I can follow.
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
BlackBird
AddOn Development
Offline
Posts: 2069
Re: 2.8.2 release projection?
«
Reply #13 on:
January 07, 2011, 02:23:05 PM »
I understand your question. Just wanted to state that there _is_ a way to improve the security of older WB versions while waiting for 2.8.2. Don't know why Michael doesn't get the point.
By the way, sseq-lib uses tokens, too. That's why I mentioned it.
Logged
Alle großen Veränderungen beginnen im Kleinen
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: 2.8.2 release projection?
«
Reply #14 on:
January 07, 2011, 02:31:45 PM »
Yes, but sseq-lib contains a lot of files, and this is only one file
And is it better that tokens interact with DB or not ? I would really like a professional opinion from all (and not like this is my script and because of that it is the best..) so we can make WB less vulnerable to potential attacks
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
testör
Guest
Re: 2.8.2 release projection?
«
Reply #15 on:
January 07, 2011, 03:08:03 PM »
@Ivan:
Quote from: crnogorac081 on January 07, 2011, 02:31:45 PM
Yes, but sseq-lib contains a lot of files, and this is only one file
And is it better that tokens interact with DB or not ? I would really like a professional opinion from all (and not like this is my script and because of that it is the best..) so we can make WB less vulnerable to potential attacks
cheers
Just use SecureForm.php - you can use it with any WB-Version you like. Just add / adjust
Code:
require_once(WB_PATH."/framework/SecureForm.php");
class wb extends SecureForm
{
in /framework/class.wb.php and copy SecureForm.php in framework (or wherever you like, you can even make a module if adjusting require_once).
You don't need some external script that does the very same (and pretends to do something more) but much more complicated.
WebsiteBaker 2.8.2 is quite secure, but the biggest security flaw is always the server. Just secure your server, then WB is - in most cases - quite safe.
The next thing is - just think. WB is no community portal, you shouldn't give hunderts of people access (any access) you don't know personally or that are trustable.
There is no "100% safety" - forget this. 2.8.2 is in RC3 - from most cases - quite safe, will be (perhaps) a little bit more safe. You don't need more safety, because as always - more security, more restrictions.
So you don't need (apart securing your server, e.g. use a "good" hoster) external scripts. In fact, there are no external scripts, you can install and you are safe - in any cases you have to adjust them. "A little bit more security" they can give you perhaps - but that's not necessary, because WB has quite much security built-in, even more in 2.8.2.
«
Last Edit: January 07, 2011, 03:22:00 PM by testör
»
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: 2.8.2 release projection?
«
Reply #16 on:
January 07, 2011, 03:36:51 PM »
Quote from: testör on January 07, 2011, 03:08:03 PM
.. WB is no community portal, you shouldn't give hunderts of people access (any access) you don't know personally or that are trustable. ..
this is exactly what I am working on
After few years working with wb and understanding its potential, it gives me good enough basis for a community portal
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: 2.8.2 release projection?
«
Reply #17 on:
January 07, 2011, 04:08:09 PM »
Could someone please post an example how FTAN works
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
DarkViper
Development Team
Offline
Posts: 1253
Re: 2.8.2 release projection?
«
Reply #18 on:
January 07, 2011, 04:45:35 PM »
It's really easy to use:
Code: (html-form)
<form action="save.php" methode="post">
<?php
echo
$wb
->
getFTAN
();
?>
<input type="hidden" name="page_id" value="
<?php $wb
->
getIDKEY
(
$page_id
);
?>
">
all other form elements
</form>
will produce:
Code:
<form action="save.php">
<input type="hidden" name="f02047c08ab94f9a" value="7c2ec951d34f2f98">
<input type="hidden" name="page_id" value="c08ab94fd34f2f98">
... all other form elements
</form>
Code: (save.php)
<?php
if(
$wb
->
checkFTAN
()) {
$page_id
=
$wb
->
getIDKEY
(
'page_id'
);
if(
$page_id
!=
0
) {
... do
save record
}else {
... ...
check failed
,
insert error handler
}
}else {
...
check failed
,
insert error handler
}
?>
more Info about IDKEY can be found in inline docu of class SecureForm... and a bit later in the Dev-Manual(2.9.x)
«
Last Edit: January 07, 2011, 04:56:38 PM by DarkViper
»
Logged
Anleitungen lesen und selber nachdenken ist anstrengend... Da lass ich doch lieber andere für mich denken...
In
1984
: Nineteen Eighty-Four is a unrealistic utopia!!
In
2012
: Nineteen Eighty-Four is a little piece only of our reality!!
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: 2.8.2 release projection?
«
Reply #19 on:
January 07, 2011, 10:46:10 PM »
I tested it and it will not work if I have multiple forms on one page
With one form on page it looks ok..
did anyone experienced this before ?
EDIT: maybe this could be solved by creating a FTAN table in DB, and storing FTANs there?
cheers
«
Last Edit: January 07, 2011, 11:50:27 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
DarkViper
Development Team
Offline
Posts: 1253
Re: 2.8.2 release projection?
«
Reply #20 on:
January 08, 2011, 01:27:44 AM »
FTAN
: one only can exist at the same time. This doesn't matter because you can send one form only at once.
Each furter call of getFTAN will replace the FTAN generated on previouse call.
IDKEY
: you can create as much as ever you want. It can hide INTEGER or STRING or komplete ARRAYS as well. But NO objects.
The default is: check $_POST for INTEGER and return 0 on error.
you can also set to: check $_GET for a STRING and return 'f*** me' on error.
the call for that is:
$result = checkIDKEY( 'field_name', 'f***_me', 'GET' );
Both FTAN and IDKEY can be checked only once. After check it will be destroyed immediately to prevent from browser-reload and so on.
If you have more then one form a page then use following :
Code:
<?php
$ftan
=
$wb
->
getFTAN
();
?>
<form action="save0.php" methode="post">
<?php
echo
$ftan
;
?>
<input type="hidden" name="page_id" value="
<?php $wb
->
getIDKEY
(
$page_id
);
?>
">
all other form elements
</form>
<form action="save1.php" methode="post">
<?php
echo
$ftan
;
?>
<input type="hidden" name="user_id" value="
<?php $wb
->
getIDKEY
(
$user_id
);
?>
">
all other form elements
</form>
(it's more easy to handle by a template engine. one placeholder is required only.)
Code: (save0.php)
<?php
if(
$wb
->
checkFTAN
()) {
$page_id
=
$wb
->
getIDKEY
(
'page_id'
);
if(
$page_id
!=
0
) {
... do
save record
}else {
... ...
check failed
,
insert error handler
}
}else {
...
check failed
,
insert error handler
}
// at end you can clear the IDKEY-buffer
$wb
->
clearIDKEY
();
?>
Code: (save1.php)
<?php
if(
$wb
->
checkFTAN
()) {
$user_id
=
$wb
->
getIDKEY
(
'user_id'
);
if(
$user_id
!=
0
) {
... do
save record
}else {
... ...
check failed
,
insert error handler
}
}else {
...
check failed
,
insert error handler
}
?>
In some of the recoded backend modules(2.9.0) you can see how we handle that.
hope it helps
«
Last Edit: January 08, 2011, 01:31:20 AM by DarkViper
»
Logged
Anleitungen lesen und selber nachdenken ist anstrengend... Da lass ich doch lieber andere für mich denken...
In
1984
: Nineteen Eighty-Four is a unrealistic utopia!!
In
2012
: Nineteen Eighty-Four is a little piece only of our reality!!
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: 2.8.2 release projection?
«
Reply #21 on:
January 08, 2011, 02:13:07 AM »
Thanks mate,
I am having a bit complex issue here, as I have multiple forms, which are submited to SELF page:
Code:
form 1
<form action="'.$_SERVER['PHP_SELF'].'" methode="post">
<?php
echo
$ftan
;
?>
<input type="hidden" name="page_id" value="
<?php $wb
->
getIDKEY
(
$page_id
);
?>
">
all other form elements
<input type="hidden" name="type" value="upload" />
</form>
form 2
<form action="'.$_SERVER['PHP_SELF'].'" methode="post">
<?php
echo
$ftan
;
?>
<input type="hidden" name="page_id" value="
<?php $wb
->
getIDKEY
(
$page_id
);
?>
">
all other form elements
<input type="hidden" name="type" value="personal" />
</form>
form 3
<form action="'.$_SERVER['PHP_SELF'].'" methode="post">
<?php
echo
$ftan
;
?>
<input type="hidden" name="page_id" value="
<?php $wb
->
getIDKEY
(
$page_id
);
?>
">
all other form elements
<input type="hidden" name="type" value="business" />
</form>
So I have a switch and based on type(upload, personal, business) I choose what to save.
Now, I have another question, in $wb->getIDKEY($page_id) can I use $wb->getIDKEY(rand(1,1000)) and what if I have 2 same values for different fields like:
Code:
<input type="hidden" name="id-1" value="
<?php $wb
->
getIDKEY
(
'1'
);
?>
">
and
<input type="hidden" name="id-2" value="
<?php $wb
->
getIDKEY
(
'1'
);
?>
">
will it work without problem? And is there a limitation how much digits number can have ?
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
DarkViper
Development Team
Offline
Posts: 1253
Re: 2.8.2 release projection?
«
Reply #22 on:
January 08, 2011, 02:45:12 AM »
thats no problem. The original value will be untouched saved on the server. The IDKEY is like a varname only. It is not possible to get two identical IDKEYs.
How many you can store? A lot..
The Keys are stored as a 2dimensional, dynamic array into the session
Logged
Anleitungen lesen und selber nachdenken ist anstrengend... Da lass ich doch lieber andere für mich denken...
In
1984
: Nineteen Eighty-Four is a unrealistic utopia!!
In
2012
: Nineteen Eighty-Four is a little piece only of our reality!!
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: 2.8.2 release projection?
«
Reply #23 on:
January 08, 2011, 02:49:49 AM »
I just broke my brain before I figured out that in this code
Code:
<?php
if(
$wb
->
checkFTAN
()) {
$user_id
=
$wb
->
getIDKEY
(
'user_id'
);
if(
$user_id
!=
0
) {
... do
save record
}else {
... ...
check failed
,
insert error handler
}
}else {
...
check failed
,
insert error handler
}
?>
I never passed $wb->checkFTAN() because I had <?php echo $ftan; ?> called in two forms
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
DarkViper
Development Team
Offline
Posts: 1253
Re: 2.8.2 release projection?
«
Reply #24 on:
January 08, 2011, 04:13:48 AM »
nobody is perfect... and it's late night...
i guess you forgot
<?php
$ftan = $wb->getFTAN();
?>
before you defined the forms...
Logged
Anleitungen lesen und selber nachdenken ist anstrengend... Da lass ich doch lieber andere für mich denken...
In
1984
: Nineteen Eighty-Four is a unrealistic utopia!!
In
2012
: Nineteen Eighty-Four is a little piece only of our reality!!
Pages: [
1
]
2
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...