openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit e2ccafbad6d7e788fff953ab9598f88d15ec6cfa
parent 8b3bb78feff943ed52c8d435e59a24b9cb1aedf5
Author: Jan Dankert <devnull@localhost>
Date:   Thu, 10 Nov 2011 00:25:05 +0100

Den Kennwortmanager austricksen und Login/Kennwort aus statischem Formular \"klauen\". Üble Lösung, aber funktioniert im FF.

Diffstat:
action/LoginAction.class.php | 5+++++
action/LoginAction.ini.php | 7+++++--
themes/default/css/layout.css | 4++--
themes/default/js/openrat.js | 28++++++++++++++++++++++++----
themes/default/layout/index.php | 5+++++
5 files changed, 41 insertions(+), 8 deletions(-)

diff --git a/action/LoginAction.class.php b/action/LoginAction.class.php @@ -1708,6 +1708,11 @@ class LoginAction extends Action $this->setTemplateVar('software',$software); } + + function pingView() + { + echo "1"; + } } diff --git a/action/LoginAction.ini.php b/action/LoginAction.ini.php @@ -104,4 +104,8 @@ guest=true menu =login [license] -guest=true- \ No newline at end of file +guest=true + +[ping] +guest=true +direct=true diff --git a/themes/default/css/layout.css b/themes/default/css/layout.css @@ -691,8 +691,8 @@ fieldset border-left:0px; border-right:0px; - margin-top:5px; - margin-bottom:0px; + margin-top:20px; + margin-bottom:20px; margin-left:0px; margin-right:0px; } diff --git a/themes/default/js/openrat.js b/themes/default/js/openrat.js @@ -137,7 +137,7 @@ function loadView(jo, url ) filebrowserBrowseUrl:'./dispatcher.php?action=filebrowser&subaction=browse' }; - $(jo).empty().html('<div class="loader" />').load(url,function() { + $(jo).empty().html('<div class="loader" />').load(url,function(response, status, xhr) { $(jo).fadeIn(100); var o=CKEDITOR.instances[ $('textarea.editor').attr('name') ]; if (o) o.destroy(); @@ -148,10 +148,19 @@ function loadView(jo, url ) // customConfig : 'config-openrat.js' //}); if ( $(jo).find('form').length > 0 ) - $(jo).parent().parent().find('div.bottom > div.command > input').removeClass('invisible'); + $(jo).closest('div.frame').find('div.bottom > div.command > input').removeClass('invisible'); else - $(jo).parent().parent().find('div.bottom > div.command > input').addClass('invisible'); - + $(jo).closest('div.frame').find('div.bottom > div.command > input').addClass('invisible'); + + if ( $('div.window form input[type=password]').length>0 ) + { + $('div.window form input[name=login_name] ').attr('value',$('#uname' ).attr('value')); + $('div.window form input[name=login_password]').attr('value',$('#upassword').attr('value')); + } + //$.get( createUrl('login','ping',0) ); + //alert( "user: "+$('#uname').attr('value') ); + //alert( "up: "+$('#upassword').attr('value') ); + }); } @@ -423,6 +432,17 @@ function submitLink(data) function formSubmit(form) { + // Login-Hack + if ( $('div.window form input[type=password]').length>0 ) + { + $('#uname' ).attr('value',$('div.window form input[name=login_name]' ).attr('value')); + $('#upassword').attr('value',$('div.window form input[name=login_password]').attr('value')); + + $('#uname' ).closest('form').submit(); + } + + + var status = $(form).parent().parent().parent().find('div.bottom div.status'); $(status).html('<div class="loader" />'); diff --git a/themes/default/layout/index.php b/themes/default/layout/index.php @@ -100,5 +100,10 @@ document.writeln("</div>"); // --> </script> +<form class="invisible" target="temp" action=""> +<input type="text" id="uname" name="l1" /><input id="upassword" type="password" name="l2" /><input type="submit" /> +</form> +<iframe src="about:blank" name="temp" class="invisiblex" width="0px" height="0px" style="width:0px;height:0px;"></iframe> + </body> </html>