logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: Bing bot reading download links sent to outlook account?
Author
walt



Joined: 24 Oct 2015
Posts: 25

PostPosted: Sun 20 Dec '15 18:41    Post subject: Bing bot reading download links sent to outlook account? Reply with quote

Hello, I am testing a download system, where the customer receives an email with a download link. The download link has a ?code=<download code> appended to it.

Before sending the link, a mysql 'downloads' table is updated with the file name to be downloaded, and the download code. The table also has a customer ip field, which is initially left blank.

When the customer clicks on the link, a script checks the download table for the received download code, then checks to see if the ip entry in the table is blank.

If the ip is blank, this is the first time the customer has used the link. The customer's ip is saved in the table, and the download is allowed.

If the customer ever reuses the link, his ip is checked against the saved ip. If the ip's match, the download is allowed.

Now for the strange part. I am testing the system by sending download links to my microsoft outlook live account. It appears that as soon as I open the email, without clicking on the link, the link is used by Microsoft. The ip address field in my downloads table has been set, on various tries, to: 207.46.13.99, 207.46.13.20, 157.55.39.202

Now of course, when I click on the link, my download will not be allowed. My ip does not match what is stored in the downloads table.

This is so strange that I thought I'd post it for some feedback thoughts, before I check my code! I'm almost positive it's ok, it worked fine yesterday.


Last edited by walt on Sun 20 Dec '15 20:06; edited 1 time in total
Back to top
walt



Joined: 24 Oct 2015
Posts: 25

PostPosted: Sun 20 Dec '15 20:02    Post subject: Reply with quote

Problem found.

Outlook live has a setting 'Link preview'. It's either a new feature, or it set itself to 'on' overnight. It's under Options->layout->Link preview.

Unchecked it, tested it a couple of times, and the links are not being followed anymore. What a pain. It will now be necessary to filter out any ip from Microsoft, if that's possible. Who, in their right minds, would want a link to be followed as soon as an email is opened? Granted though, that it's first being filtered by Outlook, since it is doing the 'fetching'.

Maybe my whole approach is flawed, as this might happen with other email account providers.

Edit:
Added a record of the current time, for the first download. If another download is requested within 1 minute, the download goes ahead, and the ip address of the request replaces what is stored in the system.

I turned on 'link preview' in outlook to test the new code. Strangely it is not 'previewing' anymore.
Back to top


Reply to topic   Topic: Bing bot reading download links sent to outlook account? View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner