-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
Description
Initially on PR #467 I tried to use upgrade to hapi 17 to solve a vulnerability in the old version but at the end it was too hard, so I rolled back to use 16 (fortunatelly, a newer minor of 16 solved also the vulnerability).
However, I get some useful findings that could be useful in the future if this work needs to be done a the end (e.g. an new vulnerability wihtout fix in 16 minor):
- Change
server.on('log', function (event, tags), {...})
toserver.events.on('log', function (event, tags) { ... }
- Change
server.on('request-internal', function (request, event, tags) { ... }
toserver.events.on({ name: 'request', channels: 'internal' }, function(request, event, tags) { ... }
. - Don't use
server.connection(options)
function. Instead, use theoptions
object as parameter in thehapi.Server
constructor. server.start()
doesn't use a callback as parameter any longer. Notes at 17.0.0 Release Notes hapijs/hapi#3658 shows the new patter, based inawait
. However, I haven't been able to adapt the code using this.
The list is maybe incomplete (I stalled at the last one before giving up)