You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Openvas also produces a medium warning with this content for an instance not running in a subdirectory:
Summary
The host is running a server with SSL/TLS and is prone to information disclosure vulnerability.
Vulnerability Detection Result
The cookies:
Set-Cookie: 45342agfd4=replaced; path=/; HttpOnly
are missing the “secure” attribute.
Solution
Solution type: Mitigation Mitigation
Set the ‘secure’ attribute for any cookies that are sent over a SSL/TLS connection.
Affected Software/OS
Server with SSL/TLS.
Vulnerability Insight
The flaw is due to cookie is not using ‘secure’ attribute, which allows cookie to be passed to the server by the client over non-secure channels (http) and allows attacker to conduct session hijacking attacks.
Impact Level: Application
Vulnerability Detection Method
Details: SSL/TLS: Missing secure Cookie Attribute (OID: 1.3.6.1.4.1.25623.1.0.902661)
Version used: $Revision: 5543 $
References
Other:
https://www.owasp.org/index.php/SecureFlag2
http://www.ietf.org/rfc/rfc2965.txt
https://www.owasp.org/index.php/Testing_for_cookies_attributes_(OWASP-SM-002)
I just had to do this for my docker nextcloud setup. At least in my case (and I'm assuming for others too), tls is done by the nginx docker container. As a result, this test as well as the __host prefix test on scan.nextcloud.com were failing. I suppose this should be addressed on the docker-nextcloud repo as well.
Activity
rullzer commentedon Oct 5, 2017
@LukasReschke
e-alfred commentedon Oct 5, 2017
Openvas also produces a medium warning with this content for an instance not running in a subdirectory:
LukasReschke commentedon Oct 5, 2017
The secure flag is applied as soon as you log-in. There's not really a security issue here thus.
jomo commentedon Nov 19, 2018
Unfortunately this does not seem to be true, @LukasReschke.
I've double checked with Firefox' "Storage" inspector and all cookies are marked as "Secure: false".
rullzer commentedon Nov 20, 2018
@jomo did you by any chance first access the site via plain http?
I can't trigger this otherwise.
jomo commentedon Nov 20, 2018
That comment pointed me in the right direction. TLS termination is done by nginx, I should have thought of that…
I had to add this to the
config.php:Can confirm it's working now, thanks!
jomo commentedon Nov 20, 2018
In fact, the cookies are sent as secure even before login.
See observatory.mozilla.org report:

Guess this issue can be closed?
pgera commentedon Jan 13, 2019
I just had to do this for my docker nextcloud setup. At least in my case (and I'm assuming for others too), tls is done by the nginx docker container. As a result, this test as well as the __host prefix test on scan.nextcloud.com were failing. I suppose this should be addressed on the docker-nextcloud repo as well.