Language: JavaScript
Label: safe
CWE: CWE-352 \u2014 Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.

Code:
                duration: Math.floor( (session.end_time.getTime() - session.start_time.getTime()) / 1000),
                status: "Answered"
            });

            // Pause Ring
            BMS.fn.pause();


            // Stop Timer
            BMS.fn.stopTimer(window.timer);

            $("#status").html(`${caller} is disconnected`).show();


            $("#timer").fadeOut(100).fadeIn(100).fadeOut(150).fadeIn(150).fadeOut(200).fadeIn(200).fadeOut(500).fadeIn(500);

            // disable the number search and hangButton
            $("#hangButton").prop("disabled", true);

            // Show the feedback tab
            $('.nav-tabs a[href="#tab_feedback"]').tab('show');

            // Stop the phone
            phone.stop();

        }

        // Complete the session
        completeSession();
        
    });