Security fixes and dugga uppdate

Fixes in duggaed and dugga.js