mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-15 03:07:55 +01:00
Upgrade Spring version.
Fix failing export tests
This commit is contained in:
parent
e610ef60d5
commit
71e99673e4
@ -65,12 +65,12 @@ mail.errorReporterEmail=
|
|||||||
##################################################################################
|
##################################################################################
|
||||||
|
|
||||||
# Enable captcha confirmation
|
# Enable captcha confirmation
|
||||||
google.recaptcha.enabled = true
|
google.recaptcha2.enabled = true
|
||||||
|
|
||||||
# ReCaptcha is the default captcha. Public and private keys are required.
|
# ReCaptcha is the default captcha. Public and private keys are required.
|
||||||
# More Info: http://www.google.com/recaptcha .
|
# More Info: http://www.google.com/recaptcha .
|
||||||
google.recaptcha.privateKey = 6LeQ4tISAAAAAMfHMPRKyHupTfA-KE4QeTCnLXhK
|
google.recaptcha2.siteKey = 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
|
||||||
google.recaptcha.publicKey = 6LeQ4tISAAAAALzCGKNgRv8UqsDx7Cb0vq4wbJBr
|
google.recaptcha2.secretKey = 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
# Site configuration
|
# Site configuration
|
||||||
|
4
pom.xml
4
pom.xml
@ -119,8 +119,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.1</version>
|
<version>3.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.7</source>
|
<source>1.8</source>
|
||||||
<target>1.7</target>
|
<target>1.8</target>
|
||||||
<encoding>UTF-8</encoding>
|
<encoding>UTF-8</encoding>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -110,7 +110,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
<version>1.7.2</version>
|
<version>1.7.25</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -145,8 +145,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.tiles</groupId>
|
<groupId>org.apache.tiles</groupId>
|
||||||
<artifactId>tiles-jsp</artifactId>
|
<artifactId>tiles-jsp</artifactId>
|
||||||
<version>2.1.4</version>
|
<version>2.2.2</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>jcl-over-slf4j</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
@ -280,7 +286,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
<version>1.7.2</version>
|
<version>1.7.25</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -289,12 +295,6 @@
|
|||||||
<version>2.10.0</version>
|
<version>2.10.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>net.tanesha.recaptcha4j</groupId>
|
|
||||||
<artifactId>recaptcha4j</artifactId>
|
|
||||||
<version>0.0.7</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<!-- jsoup HTML parser library @ http://jsoup.org/ -->
|
<!-- jsoup HTML parser library @ http://jsoup.org/ -->
|
||||||
<groupId>org.jsoup</groupId>
|
<groupId>org.jsoup</groupId>
|
||||||
@ -316,7 +316,16 @@
|
|||||||
<artifactId>jstl</artifactId>
|
<artifactId>jstl</artifactId>
|
||||||
<version>1.2</version>
|
<version>1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>fluent-hc</artifactId>
|
||||||
|
<version>4.5.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
<version>4.5.5</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
@ -561,9 +570,9 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.mortbay.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-maven-plugin</artifactId>
|
<artifactId>jetty-maven-plugin</artifactId>
|
||||||
<version>8.1.14.v20131031</version>
|
<version>9.4.12.v20180830</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<baseAppFirst>false</baseAppFirst>
|
<baseAppFirst>false</baseAppFirst>
|
||||||
<stopKey>foo</stopKey>
|
<stopKey>foo</stopKey>
|
||||||
|
@ -167,6 +167,10 @@ public class ExporterFactory {
|
|||||||
svgXml = svgXml.replaceFirst("<svg ", "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" ");
|
svgXml = svgXml.replaceFirst("<svg ", "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!svgXml.contains("xmlns=\"http://www.w3.org/2000/svg\"")) {
|
||||||
|
svgXml = svgXml.replaceFirst("<svg ", "<svg xmlns=\"http://www.w3.org/2000/svg\" ");
|
||||||
|
}
|
||||||
|
|
||||||
// Hacks for some legacy cases ....
|
// Hacks for some legacy cases ....
|
||||||
svgXml = svgXml.replaceAll("NaN,", "0");
|
svgXml = svgXml.replaceAll("NaN,", "0");
|
||||||
svgXml = svgXml.replaceAll(",NaN", "0");
|
svgXml = svgXml.replaceAll(",NaN", "0");
|
||||||
|
@ -41,7 +41,7 @@ public class TransformerController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(method = RequestMethod.POST, value = "/transform", produces = {"application/pdf"}, consumes = {"image/svg+xml"})
|
@RequestMapping(method = RequestMethod.POST, value = "/transform", produces = {"application/pdf"}, consumes = {"image/svg+xml"})
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ModelAndView transformPdf(@RequestBody @Nullable final String content) throws IOException {
|
public ModelAndView transformPdf(@RequestBody @Nullable final String content) {
|
||||||
final Map<String, Object> values = new HashMap<String, Object>();
|
final Map<String, Object> values = new HashMap<String, Object>();
|
||||||
if (content == null || content.length() == 0) {
|
if (content == null || content.length() == 0) {
|
||||||
throw new IllegalArgumentException("Body can not be null.");
|
throw new IllegalArgumentException("Body can not be null.");
|
||||||
@ -53,7 +53,7 @@ public class TransformerController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(method = RequestMethod.POST, value = "/transform", produces = {"image/svg+xml"}, consumes = {"image/svg+xml"})
|
@RequestMapping(method = RequestMethod.POST, value = "/transform", produces = {"image/svg+xml"}, consumes = {"image/svg+xml"})
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ModelAndView transformSvg(@RequestBody @Nullable final String content) throws IOException {
|
public ModelAndView transformSvg(@RequestBody @Nullable final String content) {
|
||||||
final Map<String, Object> values = new HashMap<String, Object>();
|
final Map<String, Object> values = new HashMap<String, Object>();
|
||||||
if (content == null || content.length() == 0) {
|
if (content == null || content.length() == 0) {
|
||||||
throw new IllegalArgumentException("Body can not be null.");
|
throw new IllegalArgumentException("Body can not be null.");
|
||||||
@ -65,7 +65,7 @@ public class TransformerController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(method = RequestMethod.POST, value = "/transform", produces = {"image/png"}, consumes = {"image/svg+xml"})
|
@RequestMapping(method = RequestMethod.POST, value = "/transform", produces = {"image/png"}, consumes = {"image/svg+xml"})
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ModelAndView transformPng(@RequestBody @Nullable final String content) throws IOException {
|
public ModelAndView transformPng(@RequestBody @Nullable final String content) {
|
||||||
final Map<String, Object> values = new HashMap<String, Object>();
|
final Map<String, Object> values = new HashMap<String, Object>();
|
||||||
if (content == null || content.length() == 0) {
|
if (content == null || content.length() == 0) {
|
||||||
throw new IllegalArgumentException("Body can not be null.");
|
throw new IllegalArgumentException("Body can not be null.");
|
||||||
|
@ -0,0 +1,92 @@
|
|||||||
|
package com.wisemapping.service;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.http.NameValuePair;
|
||||||
|
import org.apache.http.client.fluent.Form;
|
||||||
|
import org.apache.http.client.fluent.Request;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
public class RecaptchaService {
|
||||||
|
|
||||||
|
final private static Logger logger = Logger.getLogger(RecaptchaService.class);
|
||||||
|
final private static String GOOGLE_RECAPTCHA_VERIFY_URL =
|
||||||
|
"https://www.google.com/recaptcha/api/siteverify";
|
||||||
|
|
||||||
|
private final static ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
private String recaptchaSecret;
|
||||||
|
|
||||||
|
public String verifyRecaptcha(String ip, String recaptchaResponse) {
|
||||||
|
|
||||||
|
final List<NameValuePair> build = Form.form()
|
||||||
|
.add("secret", recaptchaSecret)
|
||||||
|
.add("response", recaptchaResponse)
|
||||||
|
.add("remoteip", ip)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// Add logs ...
|
||||||
|
logger.debug("Response from remoteip: " + ip);
|
||||||
|
logger.debug("Response from recaptchaSecret: " + recaptchaSecret);
|
||||||
|
logger.debug("Response from recaptchaResponse: " + recaptchaResponse);
|
||||||
|
|
||||||
|
String result = StringUtils.EMPTY;
|
||||||
|
HashMap bodyJson;
|
||||||
|
try {
|
||||||
|
final byte[] body = Request
|
||||||
|
.Post(GOOGLE_RECAPTCHA_VERIFY_URL)
|
||||||
|
.bodyForm(build)
|
||||||
|
.execute()
|
||||||
|
.returnContent()
|
||||||
|
.asBytes();
|
||||||
|
|
||||||
|
bodyJson = objectMapper
|
||||||
|
.readValue(body, HashMap.class);
|
||||||
|
|
||||||
|
logger.debug("Response from recaptcha after parse: " + bodyJson);
|
||||||
|
|
||||||
|
final Boolean success = (Boolean) bodyJson.get("success");
|
||||||
|
if (!success) {
|
||||||
|
final List<String> errorCodes = (List<String>) bodyJson
|
||||||
|
.get("error-codes");
|
||||||
|
result = RecaptchaUtil.RECAPTCHA_ERROR_CODE.get(errorCodes.get(0));
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.error(e.getMessage(), e);
|
||||||
|
result = e.getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.debug("Captcha Result:" + result);
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecaptchaSecret(String recaptchaSecret) {
|
||||||
|
this.recaptchaSecret = recaptchaSecret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RecaptchaUtil {
|
||||||
|
|
||||||
|
static final Map<String, String>
|
||||||
|
RECAPTCHA_ERROR_CODE = new HashMap<>();
|
||||||
|
|
||||||
|
static {
|
||||||
|
RECAPTCHA_ERROR_CODE.put("missing-input-secret",
|
||||||
|
"The secret parameter is missing");
|
||||||
|
RECAPTCHA_ERROR_CODE.put("invalid-input-secret",
|
||||||
|
"The secret parameter is invalid or malformed");
|
||||||
|
RECAPTCHA_ERROR_CODE.put("missing-input-response",
|
||||||
|
"The response parameter is missing");
|
||||||
|
RECAPTCHA_ERROR_CODE.put("invalid-input-response",
|
||||||
|
"The response parameter is invalid or malformed");
|
||||||
|
RECAPTCHA_ERROR_CODE.put("bad-request",
|
||||||
|
"The request is invalid or malformed");
|
||||||
|
}
|
||||||
|
}
|
@ -26,6 +26,5 @@ public interface Messages {
|
|||||||
String MAP_TITLE_ALREADY_EXISTS = "MAP_TITLE_ALREADY_EXISTS";
|
String MAP_TITLE_ALREADY_EXISTS = "MAP_TITLE_ALREADY_EXISTS";
|
||||||
String LABEL_TITLE_ALREADY_EXISTS = "LABEL_TITLE_ALREADY_EXISTS";
|
String LABEL_TITLE_ALREADY_EXISTS = "LABEL_TITLE_ALREADY_EXISTS";
|
||||||
String PASSWORD_MISSMATCH = "PASSWORD_MISSMATCH";
|
String PASSWORD_MISSMATCH = "PASSWORD_MISSMATCH";
|
||||||
String CAPTCHA_ERROR = "CAPTCHA_ERROR";
|
|
||||||
String CAPTCHA_LOADING_ERROR = "CAPTCHA_LOADING_ERROR";
|
String CAPTCHA_LOADING_ERROR = "CAPTCHA_LOADING_ERROR";
|
||||||
}
|
}
|
||||||
|
@ -18,10 +18,10 @@
|
|||||||
|
|
||||||
package com.wisemapping.validator;
|
package com.wisemapping.validator;
|
||||||
|
|
||||||
|
import com.wisemapping.service.RecaptchaService;
|
||||||
import com.wisemapping.service.UserService;
|
import com.wisemapping.service.UserService;
|
||||||
import com.wisemapping.view.UserBean;
|
import com.wisemapping.view.UserBean;
|
||||||
import com.wisemapping.model.Constants;
|
import com.wisemapping.model.Constants;
|
||||||
import net.tanesha.recaptcha.ReCaptcha;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.springframework.validation.Errors;
|
import org.springframework.validation.Errors;
|
||||||
@ -32,7 +32,7 @@ public class UserValidator
|
|||||||
implements Validator {
|
implements Validator {
|
||||||
|
|
||||||
private UserService userService;
|
private UserService userService;
|
||||||
private ReCaptcha captchaService;
|
private RecaptchaService captchaService;
|
||||||
|
|
||||||
|
|
||||||
public boolean supports(final Class clazz) {
|
public boolean supports(final Class clazz) {
|
||||||
@ -92,11 +92,11 @@ public class UserValidator
|
|||||||
this.userService = userService;
|
this.userService = userService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCaptchaService(@NotNull final ReCaptcha captchaService) {
|
public void setCaptchaService(@NotNull final RecaptchaService captchaService) {
|
||||||
this.captchaService = captchaService;
|
this.captchaService = captchaService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReCaptcha getCaptchaService() {
|
public RecaptchaService getCaptchaService() {
|
||||||
return captchaService;
|
return captchaService;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,36 +1,35 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright [2015] [wisemapping]
|
* Copyright [2015] [wisemapping]
|
||||||
*
|
*
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
* "powered by wisemapping" text requirement on every single page;
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the license at
|
* You may obtain a copy of the license at
|
||||||
*
|
*
|
||||||
* http://www.wisemapping.org/license
|
* http://www.wisemapping.org/license
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.wisemapping.webmvc;
|
package com.wisemapping.webmvc;
|
||||||
|
|
||||||
|
|
||||||
import com.wisemapping.model.AuthenticationType;
|
|
||||||
import com.wisemapping.service.InvalidAuthSchemaException;
|
|
||||||
import com.wisemapping.validator.Messages;
|
|
||||||
import com.wisemapping.exceptions.WiseMappingException;
|
import com.wisemapping.exceptions.WiseMappingException;
|
||||||
|
import com.wisemapping.model.AuthenticationType;
|
||||||
import com.wisemapping.model.User;
|
import com.wisemapping.model.User;
|
||||||
import com.wisemapping.security.Utils;
|
import com.wisemapping.security.Utils;
|
||||||
|
import com.wisemapping.service.InvalidAuthSchemaException;
|
||||||
import com.wisemapping.service.InvalidUserEmailException;
|
import com.wisemapping.service.InvalidUserEmailException;
|
||||||
|
import com.wisemapping.service.RecaptchaService;
|
||||||
import com.wisemapping.service.UserService;
|
import com.wisemapping.service.UserService;
|
||||||
|
import com.wisemapping.validator.Messages;
|
||||||
import com.wisemapping.validator.UserValidator;
|
import com.wisemapping.validator.UserValidator;
|
||||||
import com.wisemapping.view.UserBean;
|
import com.wisemapping.view.UserBean;
|
||||||
import net.tanesha.recaptcha.ReCaptcha;
|
|
||||||
import net.tanesha.recaptcha.ReCaptchaResponse;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
@ -55,11 +54,13 @@ public class UsersController {
|
|||||||
private UserService userService;
|
private UserService userService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ReCaptcha captchaService;
|
private RecaptchaService captchaService;
|
||||||
|
|
||||||
@Value("${google.recaptcha.enabled}")
|
@Value("${google.recaptcha2.enabled}")
|
||||||
private boolean captchaEnabled;
|
private boolean captchaEnabled;
|
||||||
|
|
||||||
|
@Value("${google.recaptcha2.siteKey}")
|
||||||
|
private String recaptchaSiteKey;
|
||||||
|
|
||||||
@RequestMapping(value = "user/resetPassword", method = RequestMethod.GET)
|
@RequestMapping(value = "user/resetPassword", method = RequestMethod.GET)
|
||||||
public ModelAndView showResetPasswordPage() {
|
public ModelAndView showResetPasswordPage() {
|
||||||
@ -74,10 +75,7 @@ public class UsersController {
|
|||||||
userService.resetPassword(email);
|
userService.resetPassword(email);
|
||||||
result = new ModelAndView("forgotPasswordSuccess");
|
result = new ModelAndView("forgotPasswordSuccess");
|
||||||
|
|
||||||
} catch (InvalidUserEmailException e) {
|
} catch (InvalidUserEmailException | InvalidAuthSchemaException e) {
|
||||||
result = new ModelAndView("forgotPasswordError");
|
|
||||||
}
|
|
||||||
catch (InvalidAuthSchemaException e) {
|
|
||||||
result = new ModelAndView("forgotPasswordError");
|
result = new ModelAndView("forgotPasswordError");
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -89,10 +87,8 @@ public class UsersController {
|
|||||||
// If captcha is enabled, generate it ...
|
// If captcha is enabled, generate it ...
|
||||||
final Properties prop = new Properties();
|
final Properties prop = new Properties();
|
||||||
prop.put("theme", "white");
|
prop.put("theme", "white");
|
||||||
|
request.setAttribute("recaptchaSiteKey", recaptchaSiteKey);
|
||||||
final String captchaHtml = captchaService.createRecaptchaHtml(null, prop);
|
request.setAttribute("recaptchaEnabled", true);
|
||||||
request.setAttribute("captchaHtml", captchaHtml);
|
|
||||||
request.setAttribute("captchaEnabled", true);
|
|
||||||
}
|
}
|
||||||
return new ModelAndView("userRegistration", "user", new UserBean());
|
return new ModelAndView("userRegistration", "user", new UserBean());
|
||||||
}
|
}
|
||||||
@ -115,7 +111,7 @@ public class UsersController {
|
|||||||
|
|
||||||
boolean confirmRegistrationByEmail = false;
|
boolean confirmRegistrationByEmail = false;
|
||||||
user.setAuthenticationType(AuthenticationType.DATABASE);
|
user.setAuthenticationType(AuthenticationType.DATABASE);
|
||||||
userService.createUser(user, confirmRegistrationByEmail,true);
|
userService.createUser(user, confirmRegistrationByEmail, true);
|
||||||
|
|
||||||
// Forward to the success view ...
|
// Forward to the success view ...
|
||||||
result = new ModelAndView("userRegistrationSuccess");
|
result = new ModelAndView("userRegistrationSuccess");
|
||||||
@ -130,7 +126,7 @@ public class UsersController {
|
|||||||
return "accountSettings";
|
return "accountSettings";
|
||||||
}
|
}
|
||||||
|
|
||||||
private BindingResult validateRegistrationForm(@NotNull UserBean userBean, @NotNull HttpServletRequest request, @NotNull BindingResult bindingResult) {
|
private void validateRegistrationForm(@NotNull UserBean userBean, @NotNull HttpServletRequest request, @NotNull BindingResult bindingResult) {
|
||||||
final UserValidator userValidator = new UserValidator();
|
final UserValidator userValidator = new UserValidator();
|
||||||
userValidator.setUserService(userService);
|
userValidator.setUserService(userService);
|
||||||
userValidator.setCaptchaService(captchaService);
|
userValidator.setCaptchaService(captchaService);
|
||||||
@ -138,21 +134,18 @@ public class UsersController {
|
|||||||
|
|
||||||
// If captcha is enabled, generate it ...
|
// If captcha is enabled, generate it ...
|
||||||
if (captchaEnabled) {
|
if (captchaEnabled) {
|
||||||
final String challenge = request.getParameter("recaptcha_challenge_field");
|
final String gReponse = request.getParameter("g-recaptcha-response");
|
||||||
final String uresponse = request.getParameter("recaptcha_response_field");
|
|
||||||
|
|
||||||
if (challenge != null && uresponse != null) {
|
if (gReponse != null) {
|
||||||
final String remoteAddr = request.getRemoteAddr();
|
final String remoteAddr = request.getRemoteAddr();
|
||||||
final ReCaptchaResponse reCaptchaResponse = captchaService.checkAnswer(remoteAddr, challenge, uresponse);
|
final String reCaptchaResponse = captchaService.verifyRecaptcha(remoteAddr, gReponse);
|
||||||
|
if (!reCaptchaResponse.isEmpty()) {
|
||||||
if (!reCaptchaResponse.isValid()) {
|
bindingResult.rejectValue("captcha", reCaptchaResponse);
|
||||||
bindingResult.rejectValue("captcha", Messages.CAPTCHA_ERROR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
bindingResult.rejectValue("captcha", Messages.CAPTCHA_LOADING_ERROR);
|
bindingResult.rejectValue("captcha", Messages.CAPTCHA_LOADING_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return bindingResult;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,6 @@ PASSWORD_MISSMATCH=La contrasenya no concorda
|
|||||||
WISEMAPPING_ACCOUNT_MESSAGE=Si us plau verifiqui la informació i llegeixi les condicions del servei.
|
WISEMAPPING_ACCOUNT_MESSAGE=Si us plau verifiqui la informació i llegeixi les condicions del servei.
|
||||||
REGISTRATION_CLICK_ADVICE= Seleccionant "Registre" està acceptant les condicions del servei.
|
REGISTRATION_CLICK_ADVICE= Seleccionant "Registre" està acceptant les condicions del servei.
|
||||||
REGISTRATION_TITLE_MSG=Completi el següent formulari per a convertir-se en memore de la comunitat WiseMapping. </br>El registre és <strong>de franc</strong> i només és un moment.
|
REGISTRATION_TITLE_MSG=Completi el següent formulari per a convertir-se en memore de la comunitat WiseMapping. </br>El registre és <strong>de franc</strong> i només és un moment.
|
||||||
CAPTCHA_ERROR=Entri els caràcters com a la imatge superior.
|
|
||||||
CREATOR=Creador
|
CREATOR=Creador
|
||||||
CREATION_TIME=Data de creació
|
CREATION_TIME=Data de creació
|
||||||
EDITORS=Editors
|
EDITORS=Editors
|
||||||
|
@ -64,7 +64,6 @@ CHANGE_PASSWORD_SUCCESS=Ihr Passwort wurde erfolgreich geändert
|
|||||||
WISEMAPPING_ACCOUNT_MESSAGE=Bitte überprüfen Sie die eingegebenen WiseMapping Benutzerkonto Informationen und Geschäftsbedingungen
|
WISEMAPPING_ACCOUNT_MESSAGE=Bitte überprüfen Sie die eingegebenen WiseMapping Benutzerkonto Informationen und Geschäftsbedingungen
|
||||||
REGISTRATION_CLICK_ADVICE= Mit der Registrierung erklären Sie ihr Einverständnis mit den Geschäftsbedingungen und Datenschutzregeln von WiseMapping.
|
REGISTRATION_CLICK_ADVICE= Mit der Registrierung erklären Sie ihr Einverständnis mit den Geschäftsbedingungen und Datenschutzregeln von WiseMapping.
|
||||||
REGISTRATION_TITLE_MSG=Bitte fülle die Felder aus, um ein Mitglied der WiseMapping Gemeinschaft zu werden. Die Registrierung is <b>kostenlos</b> und in wenigen Augenblicken erledigt.
|
REGISTRATION_TITLE_MSG=Bitte fülle die Felder aus, um ein Mitglied der WiseMapping Gemeinschaft zu werden. Die Registrierung is <b>kostenlos</b> und in wenigen Augenblicken erledigt.
|
||||||
CAPTCHA_ERROR=Bitte geben Sie die Buchstaben wie auf dem Bild dargestellt ein.
|
|
||||||
CREATOR=Urheber
|
CREATOR=Urheber
|
||||||
CREATION_TIME=Erstellungs Datum
|
CREATION_TIME=Erstellungs Datum
|
||||||
EDITORS=Verfasser
|
EDITORS=Verfasser
|
||||||
|
@ -66,7 +66,6 @@ CHANGE_PASSWORD_SUCCESS=Your password has been changed successfully.
|
|||||||
WISEMAPPING_ACCOUNT_MESSAGE=Please check the WiseMapping Account information you've entered above, and review the Terms of Service
|
WISEMAPPING_ACCOUNT_MESSAGE=Please check the WiseMapping Account information you've entered above, and review the Terms of Service
|
||||||
REGISTRATION_CLICK_ADVICE= By clicking on 'Register' below you are agreeing to the Terms of Service above and the Privacy Policy.
|
REGISTRATION_CLICK_ADVICE= By clicking on 'Register' below you are agreeing to the Terms of Service above and the Privacy Policy.
|
||||||
REGISTRATION_TITLE_MSG=Please, fill the fields and become a member of WiseMapping community. Registration is <b> Free</b> and takes just a moment.
|
REGISTRATION_TITLE_MSG=Please, fill the fields and become a member of WiseMapping community. Registration is <b> Free</b> and takes just a moment.
|
||||||
CAPTCHA_ERROR=Enter the letters as they are shown in the image above.
|
|
||||||
CREATOR=Creator
|
CREATOR=Creator
|
||||||
CREATION_TIME=Creation Time
|
CREATION_TIME=Creation Time
|
||||||
EDITORS=Editors
|
EDITORS=Editors
|
||||||
|
@ -52,7 +52,6 @@ PASSWORD_MISSMATCH=La contraseña no concuerda
|
|||||||
WISEMAPPING_ACCOUNT_MESSAGE=Por favor, verifique la información que ha ingresado y lea las condiciones del servicio.
|
WISEMAPPING_ACCOUNT_MESSAGE=Por favor, verifique la información que ha ingresado y lea las condiciones del servicio.
|
||||||
REGISTRATION_CLICK_ADVICE= Seleccionando 'Registración' esta aceptando las condiciones de uso de arriba y la politica de privacidad.
|
REGISTRATION_CLICK_ADVICE= Seleccionando 'Registración' esta aceptando las condiciones de uso de arriba y la politica de privacidad.
|
||||||
REGISTRATION_TITLE_MSG=Complete el siguiente formulario para convertirse en un miembro de la comunidad de WiseMapping. </br>La registración es <strong>Gratis</strong> y sólo toma un momento.
|
REGISTRATION_TITLE_MSG=Complete el siguiente formulario para convertirse en un miembro de la comunidad de WiseMapping. </br>La registración es <strong>Gratis</strong> y sólo toma un momento.
|
||||||
CAPTCHA_ERROR=Ingrese los caracteres tal como son mostrados en la imagen arriba.
|
|
||||||
CREATOR=Creador
|
CREATOR=Creador
|
||||||
CREATION_TIME=Fecha de creación
|
CREATION_TIME=Fecha de creación
|
||||||
EDITORS=Editores
|
EDITORS=Editores
|
||||||
|
@ -69,7 +69,6 @@ CHANGE_PASSWORD_SUCCESS=Votre mot de passe a été changé avec succès.
|
|||||||
WISEMAPPING_ACCOUNT_MESSAGE=Merci de vérifier l'information de Compte WiseMapping que vous avez saisie, et de relire les conditions de service
|
WISEMAPPING_ACCOUNT_MESSAGE=Merci de vérifier l'information de Compte WiseMapping que vous avez saisie, et de relire les conditions de service
|
||||||
REGISTRATION_CLICK_ADVICE=En cliquant "M'enregistrer" ci-dessous, vous acceptez les conditions de service ci-dessus ainsi que les règles de confidentialité.
|
REGISTRATION_CLICK_ADVICE=En cliquant "M'enregistrer" ci-dessous, vous acceptez les conditions de service ci-dessus ainsi que les règles de confidentialité.
|
||||||
REGISTRATION_TITLE_MSG=Devenez membre de la communauté WiseMapping en remplissant les champs ci-dessous. L'inscription est <b> gratuite </b> et ne prend qu'un instant.
|
REGISTRATION_TITLE_MSG=Devenez membre de la communauté WiseMapping en remplissant les champs ci-dessous. L'inscription est <b> gratuite </b> et ne prend qu'un instant.
|
||||||
CAPTCHA_ERROR=Saisissez les caractères affichés dans l'image ci-dessus.
|
|
||||||
CREATOR=Créateur
|
CREATOR=Créateur
|
||||||
CREATION_TIME=Heure de création
|
CREATION_TIME=Heure de création
|
||||||
EDITORS=Editeurs
|
EDITORS=Editeurs
|
||||||
|
@ -64,7 +64,6 @@ CHANGE_PASSWORD_SUCCESS=La password è stata cambiata correttamente
|
|||||||
WISEMAPPING_ACCOUNT_MESSAGE=Prego, controllare le informazioni del tuo account WiseMapping appena inserite, e prendi note dei Termini di Servizio
|
WISEMAPPING_ACCOUNT_MESSAGE=Prego, controllare le informazioni del tuo account WiseMapping appena inserite, e prendi note dei Termini di Servizio
|
||||||
REGISTRATION_CLICK_ADVICE= Cliccando su 'Registra' di seguito, si accettano i Termini di Servizio riportati e le Privacy Policy di cui sopra.
|
REGISTRATION_CLICK_ADVICE= Cliccando su 'Registra' di seguito, si accettano i Termini di Servizio riportati e le Privacy Policy di cui sopra.
|
||||||
REGISTRATION_TITLE_MSG=Prego, compilare tutti i campi per diventare membri della Community WiseMapping. La registrazione è <strong> Free</strong> richiede pochi istanti.
|
REGISTRATION_TITLE_MSG=Prego, compilare tutti i campi per diventare membri della Community WiseMapping. La registrazione è <strong> Free</strong> richiede pochi istanti.
|
||||||
CAPTCHA_ERROR=Inserire le lettere così come appaiono sull'immagine riportata qui sopra.
|
|
||||||
CREATOR=Creatore
|
CREATOR=Creatore
|
||||||
CREATION_TIME=Orario di creazione
|
CREATION_TIME=Orario di creazione
|
||||||
EDITORS=Editori
|
EDITORS=Editori
|
||||||
|
@ -62,7 +62,6 @@ CHANGE_PASSWORD_SUCCESS=Sua senha foi alterada com sucesso.
|
|||||||
WISEMAPPING_ACCOUNT_MESSAGE=Confira a informação da conta WiseMapping que você inseriu acima e reveja os Termos de Serviço.
|
WISEMAPPING_ACCOUNT_MESSAGE=Confira a informação da conta WiseMapping que você inseriu acima e reveja os Termos de Serviço.
|
||||||
REGISTRATION_CLICK_ADVICE= Clicando em Registrar abaixo você está concordando com os Termos de Seviço acima e a Política de Privacidade.
|
REGISTRATION_CLICK_ADVICE= Clicando em Registrar abaixo você está concordando com os Termos de Seviço acima e a Política de Privacidade.
|
||||||
REGISTRATION_TITLE_MSG=Preencha os campos e toene-se membro da comunidade WiseMapping. O Registro é <b> Gratuito</b> e leva só alguns instantes.
|
REGISTRATION_TITLE_MSG=Preencha os campos e toene-se membro da comunidade WiseMapping. O Registro é <b> Gratuito</b> e leva só alguns instantes.
|
||||||
CAPTCHA_ERROR=Digite as letras como são exibidas na imagem acima.
|
|
||||||
CREATOR=Criador
|
CREATOR=Criador
|
||||||
CREATION_TIME=Tempo de Criação
|
CREATION_TIME=Tempo de Criação
|
||||||
EDITORS=Editores
|
EDITORS=Editores
|
||||||
|
@ -63,7 +63,6 @@ CHANGE_PASSWORD_SUCCESS=密码修改成功!
|
|||||||
WISEMAPPING_ACCOUNT_MESSAGE=请检查已输入的账户信息,并查阅服务条款
|
WISEMAPPING_ACCOUNT_MESSAGE=请检查已输入的账户信息,并查阅服务条款
|
||||||
REGISTRATION_CLICK_ADVICE= 点击下面的“注册”,表示你同意上面提到的服务条款和隐私政策。
|
REGISTRATION_CLICK_ADVICE= 点击下面的“注册”,表示你同意上面提到的服务条款和隐私政策。
|
||||||
REGISTRATION_TITLE_MSG=请填写表单,你将成为WiseMapping社区的一员。注册<b> 免费</b> 快速。
|
REGISTRATION_TITLE_MSG=请填写表单,你将成为WiseMapping社区的一员。注册<b> 免费</b> 快速。
|
||||||
CAPTCHA_ERROR=输入你在上面的图像中看到的字符。
|
|
||||||
CREATOR=创建者
|
CREATOR=创建者
|
||||||
CREATION_TIME=创建时间
|
CREATION_TIME=创建时间
|
||||||
EDITORS=编辑者
|
EDITORS=编辑者
|
||||||
|
@ -64,7 +64,6 @@ CHANGE_PASSWORD_SUCCESS=密碼修改成功!
|
|||||||
WISEMAPPING_ACCOUNT_MESSAGE=請檢查已輸入的帳戶資訊,並查閱服務條款
|
WISEMAPPING_ACCOUNT_MESSAGE=請檢查已輸入的帳戶資訊,並查閱服務條款
|
||||||
REGISTRATION_CLICK_ADVICE= 點擊下麵的“註冊”,表示你同意上面提到的服務條款和隱私政策。
|
REGISTRATION_CLICK_ADVICE= 點擊下麵的“註冊”,表示你同意上面提到的服務條款和隱私政策。
|
||||||
REGISTRATION_TITLE_MSG=請填寫表單,你將成為WiseMapping社區的一員。註冊<b> 免費</b> 快速。
|
REGISTRATION_TITLE_MSG=請填寫表單,你將成為WiseMapping社區的一員。註冊<b> 免費</b> 快速。
|
||||||
CAPTCHA_ERROR=輸入你在上面的圖像中看到的字元。
|
|
||||||
CREATOR=創建者
|
CREATOR=創建者
|
||||||
CREATION_TIME=創建時間
|
CREATION_TIME=創建時間
|
||||||
EDITORS=編輯者
|
EDITORS=編輯者
|
||||||
|
@ -75,12 +75,12 @@ mail.errorReporterEmail=
|
|||||||
##################################################################################
|
##################################################################################
|
||||||
|
|
||||||
# Enable captcha confirmation
|
# Enable captcha confirmation
|
||||||
google.recaptcha.enabled = true
|
google.recaptcha2.enabled = true
|
||||||
|
|
||||||
# ReCaptcha is the default captcha. Public and private keys are required.
|
# ReCaptcha is the default captcha. Public and private keys are required.
|
||||||
# More Info: http://www.google.com/recaptcha .
|
# More Info: http://www.google.com/recaptcha .
|
||||||
google.recaptcha.privateKey = 6LeQ4tISAAAAAMfHMPRKyHupTfA-KE4QeTCnLXhK
|
google.recaptcha2.siteKey = 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
|
||||||
google.recaptcha.publicKey = 6LeQ4tISAAAAALzCGKNgRv8UqsDx7Cb0vq4wbJBr
|
google.recaptcha2.secretKey = 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
# Site configuration
|
# Site configuration
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
log4j.rootLogger=DEBUG, stdout, R
|
log4j.rootLogger=WARN, stdout, R
|
||||||
log4j.logger.com.wisemapping=DEBUG,stdout,R
|
log4j.logger.com.wisemapping=WARN,stdout,R
|
||||||
log4j.logger.org.springframework=DEBUG,stdout,R
|
log4j.logger.org.springframework=WARN,stdout,R
|
||||||
log4j.logger.org.codehaus.jackson=DEBUG,stdout,R
|
log4j.logger.org.codehaus.jackson=WARN,stdout,R
|
||||||
log4j.logger.org.hibernate=DEBUG,stdout,R
|
log4j.logger.org.hibernate=WARN,stdout,R
|
||||||
log4j.logger.org.hibernate.engine.StatefulPersistenceContext=DEBUG,stdout,R
|
log4j.logger.org.hibernate.engine.StatefulPersistenceContext=ERROR,stdout,R
|
||||||
|
|
||||||
#log4j.logger.org.hibernate.SQL=WARN,stdout,R
|
#log4j.logger.org.hibernate.SQL=WARN,stdout,R
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
##################################################################################
|
|
||||||
# Database Configuration
|
|
||||||
##################################################################################
|
|
||||||
|
|
||||||
# MySQL 5.X configuration properties
|
|
||||||
database.url=${DATABASE_URL}
|
|
||||||
database.driver=${DATABASE_DRIVER}
|
|
||||||
database.hibernate.dialect=${DATABASE_HIBERNATE_DIALECT}
|
|
||||||
database.username=${DATABASE_USERNAME}
|
|
||||||
database.password=${DATABASE_PASSWORD}
|
|
||||||
|
|
||||||
#------------------------
|
|
||||||
# Sendgrid Configuration
|
|
||||||
#------------------------
|
|
||||||
mail.smtp.port=587
|
|
||||||
mail.smtp.host=smtp.sendgrid.net
|
|
||||||
mail.username=${SENDGRID_USERNAME}
|
|
||||||
mail.password=${SENDGRID_PASSWORD}
|
|
||||||
mail.smtp.auth=true
|
|
||||||
mail.smtp.starttls.enable=true
|
|
||||||
mail.smtp.quitwait=false
|
|
||||||
|
|
||||||
# Required: "from" email account that will appear in the emails sent from the sender.
|
|
||||||
mail.serverSendEmail=daemon@wisemapping.herokuapp.com
|
|
||||||
|
|
||||||
# Optional: Support account that the users could use to contact you. This address will appear in emails and in some places in the site.
|
|
||||||
mail.supportEmail=support@wisemapping.com
|
|
||||||
|
|
||||||
# Optional: Unexpected errors will be reported to this address.
|
|
||||||
mail.errorReporterEmail=bug-report@wisemapping.com
|
|
||||||
|
|
||||||
##################################################################################
|
|
||||||
# Users Registration Configuration
|
|
||||||
##################################################################################
|
|
||||||
|
|
||||||
# Enable/Disable user registration confirmation by e-mail. If it's enabled, mail must be configured.
|
|
||||||
registration.email.enabled = false
|
|
||||||
|
|
||||||
# Enable captcha confirmation
|
|
||||||
google.recaptcha.enabled = true
|
|
||||||
|
|
||||||
# ReCaptcha is the default captcha. Public and private keys are required.
|
|
||||||
# More Info: http://www.google.com/recaptcha .
|
|
||||||
google.recaptcha.privateKey = 6LeQ4tISAAAAAMfHMPRKyHupTfA-KE4QeTCnLXhK
|
|
||||||
google.recaptcha.publicKey = 6LeQ4tISAAAAALzCGKNgRv8UqsDx7Cb0vq4wbJBr
|
|
||||||
|
|
||||||
##################################################################################
|
|
||||||
# Site configuration
|
|
||||||
##################################################################################
|
|
||||||
|
|
||||||
# Site administration user. This user will have special permissions for operations such as removing users, set password
|
|
||||||
# etc.
|
|
||||||
admin.user = admin@wisemapping.org
|
|
||||||
|
|
||||||
# Site URL. This url will be used during sharing emails and public views.
|
|
||||||
site.baseurl = http://http://wisemapping.herokuapp.com:8080
|
|
||||||
|
|
||||||
##################################################################################
|
|
||||||
# Google Analytics Settings
|
|
||||||
##################################################################################
|
|
||||||
google.analytics.enabled=false
|
|
||||||
google.analytics.account=UA-XXXX
|
|
@ -6,7 +6,7 @@
|
|||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||||
http://www.springframework.org/schema/security
|
http://www.springframework.org/schema/security
|
||||||
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
|
http://www.springframework.org/schema/security/spring-security-3.2.xsd">
|
||||||
|
|
||||||
<sec:authentication-manager alias="authenticationManager">
|
<sec:authentication-manager alias="authenticationManager">
|
||||||
<sec:authentication-provider ref="dbAuthenticationProvider"/>
|
<sec:authentication-provider ref="dbAuthenticationProvider"/>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||||
http://www.springframework.org/schema/security
|
http://www.springframework.org/schema/security
|
||||||
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
|
http://www.springframework.org/schema/security/spring-security-3.2.xsd">
|
||||||
|
|
||||||
|
|
||||||
<sec:authentication-manager>
|
<sec:authentication-manager>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||||
http://www.springframework.org/schema/security
|
http://www.springframework.org/schema/security
|
||||||
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
|
http://www.springframework.org/schema/security/spring-security-3.2.xsd">
|
||||||
|
|
||||||
<sec:http pattern="/css/**" security="none"/>
|
<sec:http pattern="/css/**" security="none"/>
|
||||||
<sec:http pattern="/js/**" security="none"/>
|
<sec:http pattern="/js/**" security="none"/>
|
||||||
|
@ -43,6 +43,10 @@
|
|||||||
<property name="adminUser" value="${admin.user}"/>
|
<property name="adminUser" value="${admin.user}"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean id="recaptchaService" class="com.wisemapping.service.RecaptchaService">
|
||||||
|
<property name="recaptchaSecret" value="${google.recaptcha2.secretKey}"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
<bean id="mindmapService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="mindmapService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
<property name="proxyInterfaces" value="com.wisemapping.service.MindmapService"/>
|
<property name="proxyInterfaces" value="com.wisemapping.service.MindmapService"/>
|
||||||
<property name="interceptorNames">
|
<property name="interceptorNames">
|
||||||
|
@ -86,12 +86,6 @@
|
|||||||
class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
|
class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="reCaptcha" class="net.tanesha.recaptcha.ReCaptchaImpl">
|
|
||||||
<property name="privateKey" value="${google.recaptcha.privateKey}"/>
|
|
||||||
<property name="publicKey" value="${google.recaptcha.publicKey}"/>
|
|
||||||
<property name="includeNoscript" value="false"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="multipartResolver"
|
<bean id="multipartResolver"
|
||||||
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
||||||
<!-- one of the properties available; the maximum file size in bytes -->
|
<!-- one of the properties available; the maximum file size in bytes -->
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
<meta property="og:url" content="http://www.wisemapping.com"/>
|
<meta property="og:url" content="http://www.wisemapping.com"/>
|
||||||
<meta property="og:image" content="http://www.wisemapping.com/images/logo.png"/>
|
<meta property="og:image" content="http://www.wisemapping.com/images/logo.png"/>
|
||||||
<meta property="og:site_name" content="WiseMapping.com"/>
|
<meta property="og:site_name" content="WiseMapping.com"/>
|
||||||
|
|
||||||
<title>
|
<title>
|
||||||
<spring:message code="SITE.TITLE"/>-
|
<spring:message code="SITE.TITLE"/>-
|
||||||
<c:choose>
|
<c:choose>
|
||||||
@ -44,6 +43,8 @@
|
|||||||
|
|
||||||
<script type="text/javascript" language="javascript" src="bootstrap/js/bootstrap.min.js"></script>
|
<script type="text/javascript" language="javascript" src="bootstrap/js/bootstrap.min.js"></script>
|
||||||
<script src="js/less.js" type="text/javascript"></script>
|
<script src="js/less.js" type="text/javascript"></script>
|
||||||
|
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -47,11 +47,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-10 col-md-offset-2">
|
<div class="col-md-10 col-md-offset-2">
|
||||||
<c:if test="${requestScope.captchaEnabled}">
|
<c:if test="${requestScope.recaptchaEnabled}">
|
||||||
${requestScope.captchaHtml}
|
<div class="g-recaptcha" data-sitekey="${requestScope.recaptchaSiteKey}"></div>
|
||||||
<p>
|
<p>${requestScope.captcha}</p>
|
||||||
<form:errors path="captcha" cssClass="errorMsg"/>
|
|
||||||
</p>
|
|
||||||
</c:if>
|
</c:if>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" focusable="true" id="workspace" preserveAspectRatio="none" width="1366" height="768"
|
<svg focusable="true" id="workspace" preserveAspectRatio="none" width="1366" height="768"
|
||||||
viewBox="-1155.6372189600004 -720.729471672 2410.0770093120004 1355.0066933760004">
|
viewBox="-1155.6372189600004 -720.729471672 2410.0770093120004 1355.0066933760004">
|
||||||
<path style="fill:none " stroke-width="1px" stroke="#495879" stroke-opacity="1" fill="#495879" fill-opacity="1"
|
<path style="fill:none " stroke-width="1px" stroke="#495879" stroke-opacity="1" fill="#495879" fill-opacity="1"
|
||||||
visibility="visible" d="M-158,567 C-168,567 -178,689 -188,689"></path>
|
visibility="visible" d="M-158,567 C-168,567 -178,689 -188,689"></path>
|
||||||
|
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 174 KiB |
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" focusable="true" id="workspace" preserveAspectRatio="none" width="1024" height="768"
|
<svg focusable="true" id="workspace" preserveAspectRatio="none" width="1024" height="768"
|
||||||
viewBox="-427.77 -328.5450000000001 903.1680000000001 677.3760000000001">
|
viewBox="-427.77 -328.5450000000001 903.1680000000001 677.3760000000001">
|
||||||
<path style="fill:none " stroke-width="1px" stroke="#495879" stroke-opacity="1" fill="#495879" fill-opacity="1"
|
<path style="fill:none " stroke-width="1px" stroke="#495879" stroke-opacity="1" fill="#495879" fill-opacity="1"
|
||||||
d="M-384,78 C-393,78 -404,92 -413,92" visibility="visible"></path>
|
d="M-384,78 C-393,78 -404,92 -413,92" visibility="visible"></path>
|
||||||
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Loading…
Reference in New Issue
Block a user