| die letzten Änderungen * Seitenstruktur * Stichwortsuche :


logo_puschin.jpg

Startseite

Knowledge base



Kontakt

Impressum

Knowledge base - Open-Xchange

Knowledge base

8 Benutzer online Druckversion




zurück



Open-Xchange
Bei jedem Klick auf eine gültige Session prüfen

In meinen Augen ist es sinnvoll bei jedem Klick in der Anwendung zu überprüfen, ob noch eine gültige Session vorhanden ist.

src/intranet.java

protected void doGet

...

        String cookieval = "";
        String scookieval= "";
        String jcookie = null;
        String enablesecurity;
        enablesecurity = System.getProperty("enablesecurity");
        if (enablesecurity == null)
                enablesecurity = "";

        boolean debug = false;
        if (enablesecurity.equals("debug")) {
                debug = true;
        }

...

        // 2006, g.o.d.
        //
        if (enablesecurity.equals("debug") || enablesecurity.equals("")) {
                if (debug) { System.out.println("Der g.o.d. Check wird durchgefuehrt."); }
                try {
                        com.openexchange.thread.Sdc sdc = new com.openexchange.thread.Sdc();
                        String usetls = System.getProperty("enabletls");
                        if (usetls == null)
                           usetls = "";
                        if (usetls.equals("yes")) {
                           sdc.enableSSL(true);
                        }
                        sdc.getSocket();
                        sdc.createSSLSocket();
                        String frank = sdc.getSession(sid).toString();
                        if (debug) { System.out.println("Ausgabe von getSession : " + frank); }
                        if (frank != null) {
                                if (frank.startsWith("ERROR")) {
                                        if (debug) { System.out.println("Der Benutzer wird zum Beenden gezwungen."); }
                                        denyNoCookie(back,response);
                                        back.close();
                                        session.invalidate();
                                        return;
                                }
                                else
                                {
                                        if (debug) { System.out.println("Alles ist gut, der Benutzer kann arbeiten."); }
                                }
                        }
                        else
                        {
                                if (debug) { System.out.println("Achtung : frank ist null."); }
                        }
                        sdc.closeSocket();


                } catch (Exception ie) {
                        ie.printStackTrace();
                        log("Exception: "+ie.getMessage()+"\n"+ie);
                        response.setContentType("text/html");
                        write(back,"<html>\n");
                        write(back,"<head>\n");
                        write(back,"<title>Open-Xchange&trade; - Groupware</title>\n");
                        write(back,"<body bgcolor=\"#ffffff\">\n");
                        write(back,"<h2>The Open-Xchange&trade; Session Daemon is not running - Groupware.</h2>\n");
                        write(back,"<h3>Please inform the Administrator!</h3>\n");
                        if (ie.getMessage() != null)
                                write(back,"<div style=\"border: solid 1px blacK; background-color:#b0b6c7; padding:5px\"><b>Exception: " + ie.getMessage() + "</b></div>\n");
                                write(back,"</body>\n");
                                write(back,"</html>\n");
                                return;
                        }
        }




Die Datei --> src/webmail.java analog!

zurück



Knowledge base wurde zuletzt bearbeitet am 12.07.13 durch Frank

www.puschin.de
login

<body bgcolor='#FFFFFF' link='#000000' vlink='#000000' alink='#000000' text='#000000'><font face='Verdana' size='2'><strong>www.puschin.de</strong><br>Die Webseite http://www.puschin.de bietet eine interessante Webseite zu vielen Themen aus dem Bereich Linux und Windows. Man findet hier Tipps und Tricks zu cms php apache postfix openxchange tomcat windows linux firewall <br><br><font face='Verdana' size='2'><li><a href='cms.php?print=&aktion=thema_anzeigen&menue_id=191'>Startseite</a><font face='Verdana' size='2'><li><a href='cms.php?print=&aktion=thema_anzeigen&menue_id=63'>Knowledge base</a><font face='Verdana' size='2'><li><a href='cms.php?print=&aktion=thema_anzeigen&menue_id=57'>Kontakt</a><font face='Verdana' size='2'><li><a href='cms.php?print=&aktion=thema_anzeigen&menue_id=9'>Impressum</a></body>