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:
            "stateSaveParams": function(settings, data) {

                var api = this.api();
                
                // Disable search, order and length in stateSave
                data.search.search = "";
                data.length = 15;
                data.order = DtDefaultOrder;

                // Set the select text on filter
                data.columns.forEach( (item, i) => {

                    var footer = api.column(i).footer();

                    var filterObject = $(footer).find("select");

                    if( filterObject.length > 0 ) {
                        
                        // Add option text in the state
                        data.columns[i].search.text = $(filterObject).find(":selected").text();

                    }

                });

            },