Merge branch 'main' into lang_de
This commit is contained in:
@@ -85,7 +85,7 @@ public class MailingList implements MessageHandler, ProblemListener {
|
|||||||
* @param state
|
* @param state
|
||||||
*/
|
*/
|
||||||
public MailingList(String email, String name, String imapHost, int imapPort, String imapUser, String imapPass, String inbox, String smtpHost, int smtpPort, String smtpUser, String smtpPass, int state) {
|
public MailingList(String email, String name, String imapHost, int imapPort, String imapUser, String imapPass, String inbox, String smtpHost, int smtpPort, String smtpUser, String smtpPass, int state) {
|
||||||
this.email = email;
|
this.email = email.toLowerCase();
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.state = state;
|
this.state = state;
|
||||||
this.smtp = new SmtpClient(smtpHost,smtpPort,smtpUser,smtpPass,email);
|
this.smtp = new SmtpClient(smtpHost,smtpPort,smtpUser,smtpPass,email);
|
||||||
@@ -260,6 +260,7 @@ public class MailingList implements MessageHandler, ProblemListener {
|
|||||||
*/
|
*/
|
||||||
public static MailingList load(String listEmail) {
|
public static MailingList load(String listEmail) {
|
||||||
if (listEmail == null) return null;
|
if (listEmail == null) return null;
|
||||||
|
listEmail = listEmail.toLowerCase();
|
||||||
var ml = cache.get(listEmail);
|
var ml = cache.get(listEmail);
|
||||||
try {
|
try {
|
||||||
var rs = Database.open()
|
var rs = Database.open()
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class User {
|
|||||||
* @param permissions
|
* @param permissions
|
||||||
*/
|
*/
|
||||||
public User(String email, String name, String salt, String hashedPass, int permissions) {
|
public User(String email, String name, String salt, String hashedPass, int permissions) {
|
||||||
this.email = email;
|
this.email = email.toLowerCase();
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.salt = salt;
|
this.salt = salt;
|
||||||
this.hashedPass = hashedPass;
|
this.hashedPass = hashedPass;
|
||||||
@@ -91,6 +91,7 @@ public class User {
|
|||||||
* @throws SQLException
|
* @throws SQLException
|
||||||
*/
|
*/
|
||||||
public static User create(String email, String name, String password) throws SQLException {
|
public static User create(String email, String name, String password) throws SQLException {
|
||||||
|
email = email.toLowerCase();
|
||||||
String salt = null;
|
String salt = null;
|
||||||
String hashedPass = null;
|
String hashedPass = null;
|
||||||
if (password != null) {
|
if (password != null) {
|
||||||
@@ -139,7 +140,7 @@ public class User {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static User load(String email) throws SQLException {
|
public static User load(String email) throws SQLException {
|
||||||
var rs = Database.open().select(TABLE_NAME).where(EMAIL,email).compile().exec();
|
var rs = Database.open().select(TABLE_NAME).where(EMAIL,email.toLowerCase()).compile().exec();
|
||||||
try {
|
try {
|
||||||
if (rs.next()) {
|
if (rs.next()) {
|
||||||
return User.from(rs);
|
return User.from(rs);
|
||||||
@@ -208,7 +209,7 @@ public class User {
|
|||||||
public static User loadUser(String email, String password) throws InvalidKeyException, SQLException {
|
public static User loadUser(String email, String password) throws InvalidKeyException, SQLException {
|
||||||
ResultSet rs = Database.open()
|
ResultSet rs = Database.open()
|
||||||
.select(TABLE_NAME)
|
.select(TABLE_NAME)
|
||||||
.where(EMAIL,email)
|
.where(EMAIL,email.toLowerCase())
|
||||||
.compile()
|
.compile()
|
||||||
.exec();
|
.exec();
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user