security

How to enable samesite for jsessionid cookie

无人久伴 提交于 2020-07-29 05:27:51
问题 How can i enable samesite for my web application which runs on wildfly as. Checked standalone.xml however could not find an appropriate tag within <servlet-container name="default"> <session-cookie http-only="true" secure="true"/> <jsp-config/> </servlet-container> 回答1: As for now the Java Servlet 4.0 specification doesn't support the SameSite cookie attribute. You can see available attributes by opening javax.servlet.http.Cookie java class. However, there are a couple of workarounds. You can

Unauthorized API Calls - Secure and allow only registered Frontend app

本小妞迷上赌 提交于 2020-07-23 04:03:11
问题 I have backend api in Laravel and using Laravel Passport(OAuth2) . I see OAuth2 is super cool and secures my auth request (with api middleware in laravel) and allow access only to authorized users. But i can access the backend api for unauthorised usage for example Routes: ( /register ) or ( /login ) without any api key. Most attackers will see this api call in network tab and can send DDOS attack. Since Laravel Passport has rate-limiting inbuilt, still i don't want people to access my

Unauthorized API Calls - Secure and allow only registered Frontend app

纵然是瞬间 提交于 2020-07-23 04:02:27
问题 I have backend api in Laravel and using Laravel Passport(OAuth2) . I see OAuth2 is super cool and secures my auth request (with api middleware in laravel) and allow access only to authorized users. But i can access the backend api for unauthorised usage for example Routes: ( /register ) or ( /login ) without any api key. Most attackers will see this api call in network tab and can send DDOS attack. Since Laravel Passport has rate-limiting inbuilt, still i don't want people to access my

Protection against malicious PNG in Django

送分小仙女□ 提交于 2020-07-22 10:08:41
问题 I found following security notice on Django website: Django’s media upload handling poses some vulnerabilities when that media is served in ways that do not follow security best practices. Specifically, an HTML file can be uploaded as an image if that file contains a valid PNG header followed by malicious HTML. This file will pass verification of the library that Django uses for ImageField image processing (Pillow). When this file is subsequently displayed to a user, it may be displayed as

Is it secure to publish my .git directory for debugging?

て烟熏妆下的殇ゞ 提交于 2020-07-20 17:24:34
问题 I have a git related question (git pull fails on my webserver) and to further describe my problem I thought it could be a good idea to offer also my .git directory so that git geeks could look inside and figure out what could be the problem. Is it a good idea to make public a .git folder OR what to look out for when doing so OR what kind of dump message from git should be offered for debugging git errors? 回答1: Security Making public the .git directory is just like make public your repo. If

Is it secure to publish my .git directory for debugging?

不羁岁月 提交于 2020-07-20 17:23:45
问题 I have a git related question (git pull fails on my webserver) and to further describe my problem I thought it could be a good idea to offer also my .git directory so that git geeks could look inside and figure out what could be the problem. Is it a good idea to make public a .git folder OR what to look out for when doing so OR what kind of dump message from git should be offered for debugging git errors? 回答1: Security Making public the .git directory is just like make public your repo. If

Can we avoid spring boot application restart, to refresh the certificates associated with its embedded tomcat container?

风流意气都作罢 提交于 2020-07-19 05:28:10
问题 With any change to the SSL certificates (in its keystore), we need to restart the spring boot application. I want to update my key store entry periodically (may be every year), but want to avoid restarting the JVM. What would it take to achieve it. I wonder if writing custom KeyManager is an acceptable practice? 回答1: Unfortunately, this is not possible. BUT You have several solutions here. Reload Tomcat connector (a bit hacky) You can restart Tomcat connector i.e. restart 8843 is possible

Can we avoid spring boot application restart, to refresh the certificates associated with its embedded tomcat container?

China☆狼群 提交于 2020-07-19 05:28:07
问题 With any change to the SSL certificates (in its keystore), we need to restart the spring boot application. I want to update my key store entry periodically (may be every year), but want to avoid restarting the JVM. What would it take to achieve it. I wonder if writing custom KeyManager is an acceptable practice? 回答1: Unfortunately, this is not possible. BUT You have several solutions here. Reload Tomcat connector (a bit hacky) You can restart Tomcat connector i.e. restart 8843 is possible

How to safely run user-supplied Javascript code inside the browser?

回眸只為那壹抹淺笑 提交于 2020-07-17 05:42:03
问题 Imagine a scenario where I want to continuously invoke user-supplied Javascript code, like in the following example, where getUserResult is a function that some user (not myself) has written: for (var i = 0; i < N; ++i) { var x = getUserResult(currentState); updateState(currentState, x); } How can I execute that kind of code in a browser and/or Node.js, without any security risks? More generally, how can I execute a Javascript function that is not allowed to modify or even read the current

How to safely run user-supplied Javascript code inside the browser?

六月ゝ 毕业季﹏ 提交于 2020-07-17 05:41:07
问题 Imagine a scenario where I want to continuously invoke user-supplied Javascript code, like in the following example, where getUserResult is a function that some user (not myself) has written: for (var i = 0; i < N; ++i) { var x = getUserResult(currentState); updateState(currentState, x); } How can I execute that kind of code in a browser and/or Node.js, without any security risks? More generally, how can I execute a Javascript function that is not allowed to modify or even read the current