Anti-virus programs are preventing long-standing AJAX connections

Hey there, I have come across something quite strange while developing a web application that relies on long-held HTTP connections using COMET to stream data between the server and the application.

The issue I've encountered is that some anti-virus programs are not playing nice with this setup. During our beta phase, users have reported problems when their anti-virus software is enabled. It's not just one particular anti-virus causing issues either. After doing some research, I stumbled upon a workaround for Avast which you can find here:

Does anyone have any suggestions on how to address this compatibility issue? Are there specific headers that can be sent to appease these security programs?

Answer №1

Dealing with this issue can be quite challenging. The anti-virus feature in question is designed to prevent harmful code from sending your personal information to a remote server through the browser. It functions by buffering all outgoing traffic, scanning it for specific patterns before allowing it to reach the network.

This method works effectively when an application sends a complete HTTP request over the socket because the anti-virus can detect the end of the request and proceed to send the data without continuous scanning.

In scenarios like yours, where there may only be a header without a length field, the anti-virus will not transmit any data until enough information is provided to fill its buffer.

If disabling this particular feature seems like the best course of action, I've encountered similar issues with AVast and McAfee. It's likely that other anti-virus software providers have implemented similar measures. Personally, I faced this problem with McAfee's Personal Information Protection feature, which appeared to be too flawed for practical use.

To address this, try consistently sending data over the socket or include a length field in your HTTP messages. I've tried notifying some anti-virus companies about this issue, and while one resolved it, another did not take any action as far as I know.

Ultimately, such protective features may prove inadequate since a malicious application could easily bypass them by encoding the data using methods like ROT13 before transmission.

Answer №2

Consider opting for HTTPS over HTTP for added security. While some scanners can still intercept HTTPS, they are not as prevalent and usually deactivated by default. Enabling this feature may disrupt SSL connectivity in Firefox, leading to limited user adoption and potentially prompting the vendor to remove it altogether.

Answer №3

One issue arises when certain files cannot be scanned in sequential order - requiring later parts to determine the maliciousness of earlier sections.

Scanners often struggle with data streams, as the continuous flow of information may not be recognized as a clean file format. This causes delays in scanning and processing your stream.

To address this issue, it is recommended to transfer data in smaller increments and utilize the COMET connection solely for notifications (closing each channel after a single notification).

Answer №4

If you opt for a non-traditional port when making web requests, you may find ways to tackle the issue. However, it's important to note that many browsers view this as cross-domain activity, posing additional challenges. I'm unable to provide a definitive solution at this time; ultimately, how the antivirus program handles traffic on a specific port will dictate the best course of action.

Answer №5

In my experience, it seems that breaking the connection and reconnecting is inevitable. What happens in your code when the connection drops during an outage? I faced a comparable issue with a firewall previously. The solution involved detecting the disconnection and then establishing a new connection. I find the suggestion to separate the data transfer quite effective.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to transform a JavaScript object into a JavaScript literal?

Currently, in my nodejs project, I have an object defined as follows: const objA = { key : 'value' }; My goal is to create a new file named obja.js which should contain the same literals from the object, rather than as a JSON literal. How can I ...

enable multiple ajax form submissions

This code snippet is responsible for fetching and displaying more results from the database onto the webpage. However, there seems to be an issue where the form submission only works once and fails on subsequent attempts. Here is the HTML structure: < ...

Encountered an error while trying to access an undefined property during an Angular Karma

I'm currently working on testing a service function that involves multiple $http.get() calls. The function being tested returns a promise but the test is failing with an error stating response is undefined. Below is the test script: it('should ...

Angular Material (8) error code S2591: The variable 'require' is not defined in the current scope

Currently, I am attempting to record the date and time in the JavaScript console. Despite the code successfully logging the dates, an error message persists: Note: The code is functioning properly, with the dates being displayed in the console. It is only ...

Instead of using a string in the createTextNode() function, consider utilizing a variable

I am attempting to use JavaScript to add another list item to an unordered list. I want the list item to display dynamic content based on a pre-existing variable. While I can successfully append a list item by using a string, things go awry when I try to i ...

What could be the reason for the malfunction of the select (mongoose query)?

I'm trying to retrieve a User's highest score post. To accomplish this, I am querying the Post model and looking for posts where their user._id matches the author in the post. Everything is functioning correctly in this regard. However, my goal ...

Learn the best practices for incorporating jQuery and other JavaScript libraries in your Angular2 projects

Is it possible to integrate a demo showcasing Bootstrap carousel with CSS3 animations in Angular2 using HTML, CSS, and JS? I have created my own implementation in Plunker with Angular2, but I am facing issues with the animated inner content of the carousel ...

Even when the outcome is not what was anticipated, mocha chai still manages to ace the examination

When testing my REST API response with mocha, chai, and express, I set the expected status to 201 but unexpectedly got a passing test result it('janus post', () => { request('https://***') .post('/***') .attach(&a ...

Is there a method to run code in the parent class right after the child constructor is called in two ES6 Parent-Child classes?

For instance: class Parent { constructor() {} } class Child { constructor() { super(); someChildCode(); } } I need to run some additional code after the execution of someChildCode(). Although I could insert it directly there, the requirement is not to ...

Creating an HTML structure that limits each li to only contain three div elements can be achieved using React and Underscore.js

To achieve this specific layout, I am looking to utilize only underscore.js functions. Below is the array that I have: var xyz = [{ 'name': 'test' },{ 'name': 'test1' },{ 'name': &ap ...

Iterate through each row asynchronously, waiting for each one to complete before moving on to the

Trying to navigate through multiple pages using puppeteer has been successful, except when attempting to parse through them at the same time. The issue seems to stem from the code executing async operations in rapid succession, overwhelming the browser. My ...

Encountering a npm error E404 when trying to install unicons package for React development

I recently started working on a weather app project using create-react-app and encountered an issue while trying to install unicons for the project. Despite attempting a few solutions, I was unable to resolve the problem. Here is the command I used for th ...

An error occurred while trying to load the XMLHttpRequest due to a NetworkError that was

I have encountered an issue while working on a client-side project using jQuery, JavaScript, and various jQuery plugins. Our professor supplied us with a proxy.php file to fetch the required data for our web application. I incorporated the easy tab plugin ...

Encountering issues during the transition to the updated react-native version 0.70 has posed a challenge for

Help! I encountered an error and need assistance fixing it. I've tried clearing my cache but that didn't work! The error is a TypeError: undefined is not a function in the JS engine Hermes. It also shows an Invariant Violation: Failed to call in ...

What is the process for refreshing a user's session from the backend following updates to their metadata?

Currently, I am utilizing Next.js on the client side, auth0 for authentication, and Django Rest Framework for the backend. By following Auth0's Manage Metadata Using the Management API guide, I successfully managed to set new metadata values (verified ...

How to dynamically update data in Angular without the need for a page refresh or loading?

Looking to enhance a wishlist feature by enabling users to delete items from the list without the need for a page refresh. Here's my approach: wish.controller('wishCtrl',['$scope','$http','$cookies','$wind ...

What are the implications of storing data on the browser in the form of a JavaScript array?

Below is the code I have written: var back_arr = [], forward_arr = [], i = 1; $('button').on('click', function(){ var new_value = $('input').val(), old_value = $('.content').html(); i = i + 1; ...

Guide to eliminating hashtags from the URL within a Sencha web application

I'm currently developing a Sencha web application and I need to find a way to remove the "#" from the URL that appears after "index.html". Every time I navigate to a different screen, I notice that the URL looks like this: ...../index.html#Controller ...

The lower text box on the page being covered by the virtual keyboard on IOS

Our website features a fixed header and footer with scrollable content. We have 20 text boxes on the page, but the ones at the bottom, like Zip and Telephone, are obscured by the iOS virtual keyboard that appears when a text box is clicked. If we could d ...

The jQuery autocomplete feature is malfunctioning, as it is unable to display any search

Creating a country list within an ajax call involves working with an array of objects: $.ajax({ url: '//maps.googleapis.com/maps/api/geocode/json?address=' + zipCode + '&region=AT', type: 'GET', dataType: &apo ...