【问题标题】:DNN cookies not secure on all portalsDNN cookie 并非在所有门户上都安全
【发布时间】:2017-01-13 20:32:35
【问题描述】:

我在 DNN 8.00.04 中有一个网站。 在这个站点中,我有 5 个门户。

在主门户中,我所有的 cookie 都是安全的,并且仅限 http。 但在其他 4 个门户网站上却没有。

我查看了 DNN 社区,但没有发现任何相关内容。 我怎样才能确保它们都是安全的?

但其他 cookie 是 DNN cookie,我不知道如何将它们设置为安全。

我已经尝试启用门户 ssl 通过:主机-站点管理-(门户)-高级设置-SSL设置

启用 SSL:选中 SSL 强制:选中

--编辑-- 更改 webconfig 从

<httpCookies httpOnlyCookies="true" requireSSL="false" domain="" />

<httpCookies httpOnlyCookies="true" requireSSL="true" domain="" />

但是,更改此设置会使管理门户不可用。

-- 编辑 2-- 添加以下内容会在尝试打开网站时出现 505 错误。

<rewrite>
   <outboundRules>
      <rule name="Add Strict-Transport-Security when HTTPS" enabled="true">
         <match serverVariable="RESPONSE_Strict_Transport_Security" pattern=".*" />
         <conditions>
            <add input="{HTTPS}" pattern="on" ignoreCase="true" />
         </conditions>
         <action type="Rewrite" value="max-age=31536000; includeSubDomains; preload" />
      </rule>
   </outboundRules>
</rewrite>

cookies main portal

cookies second portal

谢谢

【问题讨论】:

    标签: security cookies dotnetnuke


    【解决方案1】:

    不确定这是否正是您需要的,但您可以在 Web.Config 中启用 Strict Transport Security

    <system.webServer>
        <rewrite>
          <outboundRules>
            <rule name="Add Strict-Transport-Security when HTTPS" enabled="true">
              <match serverVariable="RESPONSE_Strict_Transport_Security" pattern=".*" />
              <conditions>
                <add input="{HTTPS}" pattern="on" ignoreCase="true" />
              </conditions>
              <action type="Rewrite" value="max-age=31536000; includeSubDomains; preload" />
            </rule>
          </outboundRules>
        </rewrite>
    </system.webServer>  
    

    并启用secure cookies

    <system.web>
      <httpCookies httpOnlyCookies="true" requireSSL="true" lockItem="true" />
    </system.web>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-27
      • 1970-01-01
      相关资源
      最近更新 更多