Get form password only once.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Oct 2010 12:05:07 +0000 (14:05 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Oct 2010 12:05:07 +0000 (14:05 +0200)
src/main/java/net/pterodactylus/sone/web/WebInterface.java

index 8063019..2e11b35 100644 (file)
@@ -136,9 +136,10 @@ public class WebInterface extends AbstractService {
         */
        private void registerToadlets() {
                TemplateFactory templateFactory = new SoneTemplateFactory(l10n());
+               String formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword();
 
                Template loginTemplate = templateFactory.createTemplate(createReader("/templates/login.html"));
-               loginTemplate.set("formPassword", sonePlugin.pluginRespirator().getToadletContainer().getFormPassword());
+               loginTemplate.set("formPassword", formPassword);
 
                PageToadletFactory pageToadletFactory = new PageToadletFactory(sonePlugin.pluginRespirator().getHLSimpleClient(), "/Sone/");
                pageToadlets.add(pageToadletFactory.createPageToadlet(new LoginPage(loginTemplate, this), "Login"));