Skip to content

Commit 32a60ed

Browse files
committed
Several changes:
- Disabled TLS v. 1.0 and 1.1 - idle timeout: release notes, doc fixes
1 parent d5e1afa commit 32a60ed

File tree

5 files changed

+37
-5
lines changed

5 files changed

+37
-5
lines changed

ReleaseNotes.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ <h3>Path parameters</h3>
102102

103103
<p>A feature example demonstrating this was added in <tt>examples/feature/urlparams</tt>.</p>
104104

105+
<h3>Idle timeout</h3>
106+
107+
<p>Added an <tt>&lt;idle-timeout&gt;</tt> option to the configuration (<tt>wt_config.xml</tt>). If set,
108+
<a href="classWt_1_1WApplication.html#a4e8020fca24d09661ee4bf13400354d9"><tt>WApplication::idleTimeout()</a></tt> will be triggered after the configured number of seconds.</p>
109+
110+
<p>This is intended to prevent unauthorized people from using an active session from a
111+
device that's been abandoned by the user.</p>
112+
105113
<a href="classWt_1_1WFileDropWidget.html"><h3>WFileDropWidget</h3></a>
106114

107115
<p>Added the ability to set a
@@ -124,6 +132,9 @@ <h3>Miscellaneous improvements</h3>
124132
Added <tt>insertTab</tt>, <tt>itemAt</tt> and <tt>currentItem</tt> to
125133
<a href="classWt_1_1WTabWidget.html"><tt>WTabWidget</tt></a>
126134
</li>
135+
<li>
136+
Disabled TLS v. 1.0 and 1.1 support
137+
</li>
127138
</ul>
128139

129140
<h2>Release 4.0.3 (April 12, 2018)</h2>

src/Wt/Http/Client.C

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,15 @@ bool Client::request(Http::Method method, const std::string& url,
937937
asio::ssl::context context
938938
(*ioService, asio::ssl::context::sslv23);
939939
#endif
940-
long sslOptions = asio::ssl::context::no_sslv2 | asio::ssl::context::no_sslv3;
940+
long sslOptions = asio::ssl::context::no_sslv2 |
941+
asio::ssl::context::no_sslv3 |
942+
asio::ssl::context::no_tlsv1;
943+
944+
#if (defined(WT_ASIO_IS_BOOST_ASIO) && BOOST_VERSION >= 105800) || \
945+
defined(WT_ASIO_IS_STANDALONE_ASIO)
946+
sslOptions |= asio::ssl::context::no_tlsv1_1;
947+
#endif
948+
941949
context.set_options(sslOptions);
942950

943951

src/Wt/WApplication.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,8 +2112,15 @@ class WT_API WApplication : public WObject
21122112

21132113
/*! \brief Idle timeout handler
21142114
*
2115+
* \if cpp
21152116
* If <tt>idle-timeout</tt> is set in the configuration, this method is called when
21162117
* the user seems idle for the number of seconds set in <tt>idle-timeout</tt>.
2118+
* \elseif java
2119+
* If idle timeout is set in the configuration
2120+
* ({@link Configuration#setIdleTimeout(int)}), this
2121+
* method is called when the user seems idle for the number of seconds set as the
2122+
* idle timeout.
2123+
* \endif
21172124
*
21182125
* This feature can be useful in security sensitive applications
21192126
* to prevent unauthorized users from taking over the session
@@ -2166,6 +2173,8 @@ class WT_API WApplication : public WObject
21662173
* };
21672174
* \endcode
21682175
*
2176+
* \endif
2177+
*
21692178
* \note The events currently counted as user activity are:
21702179
* - mousedown
21712180
* - mouseup
@@ -2176,8 +2185,6 @@ class WT_API WApplication : public WObject
21762185
* - touchend
21772186
* - pointerdown
21782187
* - pointerup
2179-
*
2180-
* \endif
21812188
*/
21822189
virtual void idleTimeout();
21832190

src/http/Server.C

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ void Server::start()
211211
if (!config_.sslEnableV3())
212212
sslOptions |= asio::ssl::context::no_sslv3;
213213

214+
sslOptions |= asio::ssl::context::no_tlsv1;
215+
#if (defined(WT_ASIO_IS_BOOST_ASIO) && BOOST_VERSION >= 105800) || \
216+
defined(WT_ASIO_IS_STANDALONE_ASIO)
217+
sslOptions |= asio::ssl::context::no_tlsv1_1;
218+
#endif
219+
214220
ssl_context_.set_options(sslOptions);
215221

216222
if (config_.sslClientVerification() == "none") {

wt_config.xml.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@
109109

110110
<!-- Idle timeout (seconds).
111111

112-
When the user does not interact with the application for time,
112+
When the user does not interact with the application for the set number of seconds,
113113
WApplication::idleTimeout() is called. By default, this
114-
methods quits the application immediately, but it can be overridden
114+
method quits the application immediately, but it can be overridden
115115
if different behaviour is desired.
116116

117117
This feature can be used to prevent others from taking over a session

0 commit comments

Comments
 (0)