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

Ways to eliminate brackets from a string

Currently, I am working on a challenge involving replacing strings using a function that accepts a string and an object of values. This task involves a two-part algorithm: Replacing values within the string that are enclosed in braces. If the value is wi ...

The specific model cannot be utilized for custom control within the ViewSettingsCustomItem

Exploring examples to enhance my SAPUI5 knowledge, I encountered an unusual behavior when utilizing the ViewSettingsDialog component with a ViewSettingsCustomItem filter. In my controller, I initiate the Dialog in this manner: onOrdersFilterPress ...

Troubleshooting Limitation Problem with Bootstrap Multiselect

I recently created a multiselect dropdown menu using Bootstrap Multiselect. I successfully set a limit on the number of options that can be selected (in this case, 5), and once the limit is reached, the additional options become disabled. Everything works ...

Adding the API JSON response to the MetaInfo in Vue.js

i am dealing with a meta tag that has the following structure metaInfo () { return { title: 'my title', meta: [ { name: 'description', content: 'my description' }, ...

Issue with Primefaces Calendar using <f:ajax> and <p:ajax>

I am currently experiencing a problem with using the primefaces Calendar control. My goal is to trigger a Java method when the value of the Calendar control changes, whether it's from the input box or by clicking the button. I also need to pass a spe ...

Activate Bootstrap tooltip when input element is focused, and then when the next input element is selected

I'm trying to activate a tooltip on an input element within a table. My goal is to trigger the tooltip when either that specific input element or the adjacent input element in the table are focused. Below is the HTML structure: <td class="fea ...

Determine the type and size of files prior to uploading

Similar Question: How can jQuery limit file types for upload? I have an inquiry. I am planning to use Ajax to submit a form that may include file uploads. Can you advise me on how to determine the selected file type and size before uploading? I under ...

What is the syntax for defining parameters in an overloaded arrow function in TypeScript?

Trying to create an async arrow function that can handle a single image object or an array of image objects. I'm new to TypeScript overloading and may be approaching this the wrong way. Here's what I've come up with: type ImageType = { ...

Issue: Alert: Middleware for RTK-Query API designated as reducerPath "api" is missing from store configuration even though it has been included

Currently in the process of migrating my application to NextJS, and I'm dealing with the following store configuration. It's a bit messy at the moment, but I plan on cleaning it up and reducing duplicated code once I have everything functioning p ...

What is the best way to trigger a function once another one has finished executing?

After opening the modal, I am creating some functions. The RefreshBirths() function requires the motherId and fatherId which are obtained from the getDictionaryMother() and getDictionaryFather() functions (these display my mothers and fathers on the page s ...

Resolved the time zone problem that was affecting the retrieval of data from the AWS Redshift database in Next

Currently utilizing Next.js for fetching data from AWS Redshift. When running a query from DataGrip, the results display as follows: orderMonth | repeatC | newC 2024-02-01 | 81 | 122 2024-01-01 | 3189 | 4097 However, upon retrieving the same query ...

Tips for comparing array objects in two separate React states

Comparing object arrays in two different React states can be challenging. Here is an example of the state values: review1 = [{name: John, Title: Manager},{name: Peter, Title: Engineer}, {name: Serena, Title: Supervisor}] review2 = [{personName: John, isma ...

The output of jQuery('body').text() varies depending on the browser being used

Here is the setup of my HTML code: <html> <head> <title>Test</title> <script type="text/javascript" src="jQuery.js"></script> <script type="text/javascript"> function initialize() { var ...

Deleting data from Firebase in Angular can be easily done using the AngularFire library. By

I am attempting to remove specific values from my Firebase database. I need to delete this entry from Firebase: https://i.stack.imgur.com/CAUHX.png So far, I have tried using a button to trigger the delete function like this: <div class="single-bfunc ...

What are the connections between objects in ReactJS?

I have an array containing objects, and I want to extract a specific value from another array by using the key inside it as a search parameter. Specifically, I need to retrieve the name of an item based on its ID. The primary array: this.setState({ offer ...

Creating a new database row dynamically with PHP, JavaScript, and AJAX

There is a button that triggers a popup box with a textfield when clicked. Once something is entered in the textfield and the "Add" button is clicked, it should be added to the database. Currently, upon clicking "Add", data is inserted into the DB but it ...

Inject environment variable into SCSS file while using webpack

I'm new to webpack and I need help with reading a specific value, which is the env variable from the webpack.config.js file, in a sass file. This will allow me to have different CSS styles based on the environment. For example: If the env is set to ...

What is the best way to modify Mega Menus using JavaScript?

I am currently managing a website that features "mega menu" style menus. These menus consist of nested <UL> elements and contain approximately 150 to 200 entries, resulting in a heavy load on the page and posing challenges for screen readers. To add ...

Unable to loop through the "dataList" retrieved from a service call to the java backend within an Angular 9 application

After receiving JSON data from a Java backend service called houseguidelines, the information is sent to an Angular application via a service call. I am attempting to iterate over this returned JSON data and add it to an array I have created. Unfortunately ...

Keep verifying the boolean value repeatedly

I've been working on implementing infinite scroll functionality for my card elements. Within my data.service file, I have a variable called reload that is utilized to determine whether more data needs to be loaded. This variable is set to true when th ...