Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 959bc6f

Browse files
committed
Sanitize API Key name
1 parent 1415467 commit 959bc6f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎logicaldoc-core/src/main/java/com/logicaldoc/core/security/apikey/HibernateApiKeyDAO.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import com.logicaldoc.core.HibernatePersistentObjectDAO;
1515
import com.logicaldoc.core.PersistenceException;
1616
import com.logicaldoc.util.crypt.CryptUtil;
17+
import com.logicaldoc.util.html.HTMLSanitizer;
1718

1819
/**
1920
* Hibernate implementation of {@link ApiKeyDAO}
@@ -38,6 +39,7 @@ public void store(ApiKey apiKey) throws PersistenceException {
3839
} catch (NoSuchAlgorithmException e) {
3940
throw new PersistenceException(e.getMessage(), e);
4041
}
42+
apiKey.setName(HTMLSanitizer.sanitizeSimpleText(apiKey.getName()));
4143
super.store(apiKey);
4244
}
4345

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /