1
1
/*
2
- * To change this license header, choose License Headers in Project Properties.
3
- * To change this template file, choose Tools | Templates
4
- * and open the template in the editor.
2
+ * Copyright (c) 2019 Parallax Inc.
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5
+ * and associated documentation files (the “Software”), to deal in the Software without
6
+ * restriction, including without limitation the rights to use, copy, modify, merge, publish,
7
+ * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
8
+ * Software is furnished to do so, subject to the following conditions:
9
+ *
10
+ * The above copyright notice and this permission notice shall be included in all copies or
11
+ * substantial portions of the Software.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ * SOFTWARE.
5
20
*/
21
+
6
22
package com .parallax .server .blocklyprop .servlets ;
7
23
8
24
import com .google .common .base .Strings ;
@@ -57,6 +73,8 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws Se
57
73
String email = req .getParameter ("email" );
58
74
req .setAttribute ("token" , token == null ? "" : token );
59
75
req .setAttribute ("email" , email == null ? "" : email );
76
+
77
+ LOG .info ("Redirecting to the reset password page" );
60
78
req .getRequestDispatcher ("WEB-INF/servlet/password-reset/do-reset.jsp" ).forward (req , resp );
61
79
}
62
80
@@ -69,8 +87,12 @@ protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws S
69
87
String email = req .getParameter ("email" );
70
88
req .setAttribute ("token" , token == null ? "" : token );
71
89
req .setAttribute ("email" , email == null ? "" : email );
90
+
91
+
72
92
String password = req .getParameter ("password" );
73
93
String confirmPassword = req .getParameter ("confirmpassword" );
94
+
95
+ LOG .info ("Processing the results from the reset pasword page" );
74
96
75
97
if (Strings .isNullOrEmpty (token ) || Strings .isNullOrEmpty (email ) || Strings .isNullOrEmpty (password ) || Strings .isNullOrEmpty (confirmPassword )) {
76
98
req .getRequestDispatcher ("WEB-INF/servlet/password-reset/do-reset.jsp" ).forward (req , resp );
@@ -107,8 +129,16 @@ protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws S
107
129
}
108
130
}
109
131
110
- public void showTextilePage (HttpServletRequest req , HttpServletResponse resp , PasswordResetPage passwordResetPage ) throws ServletException , IOException {
111
- String html = textileFileReader .readFile ("password-reset/" + passwordResetPage .getPage (), ServletUtils .getLocale (req ), req .isSecure ());
132
+ public void showTextilePage (
133
+ HttpServletRequest req ,
134
+ HttpServletResponse resp ,
135
+ PasswordResetPage passwordResetPage ) throws ServletException , IOException {
136
+
137
+ String html = textileFileReader .readFile (
138
+ "password-reset/" + passwordResetPage .getPage (),
139
+ ServletUtils .getLocale (req ),
140
+ req .isSecure ());
141
+
112
142
req .setAttribute ("html" , html );
113
143
req .getRequestDispatcher ("/WEB-INF/servlet/html.jsp" ).forward (req , resp );
114
144
}
0 commit comments