Skip to content

Commit

Permalink
Merge pull request #197 from delcroip/develop
Browse files Browse the repository at this point in the history
add csrf tocker in clock
  • Loading branch information
delcroip authored Jul 30, 2022
2 parents 6dd3b24 + 203cff7 commit ca746e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions htdocs/timesheet/core/js/stopWatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ class Stopwatch {
this.event.note=document.getElementById("eventNote").value;
this.event.event_location_ref="Browser:"+window.navigator.userAgent.replace(/\D+/g, '');
this.event.userid=this.userid;
return 'json='+JSON.stringify(this.event);
}else return '';

return 'json='+JSON.stringify(this.event) + "\ntoken=" + document.getElementById('csrf-token').value;
}else return 'token='+ document.getElementById('csrf-token').value;
}
//sent a POST request to create a stop event
stop() {
Expand Down

0 comments on commit ca746e8

Please sign in to comment.