Odd issue with one user -- "temporarily banned from file downloads"

Posts: 23
Joined: 11/01/2007

Hey, ya'll,

I've had my Ubercart up and running well for several weeks. I've surpassed 50 orders, most of them for file downloads. This past week, one of my customers had an unusual issue and I can't figure out why.

He successfully paid for a file download, and according to the logs, he started a download only once. (My Ubercart product settings allow five download attempts.) For some reason, there is a log item with the same time stamp that says "The user XXXXX(redacted) has been temporarily banned from file downloads."

Since then, every time that he logs on, there is the same message. He's logging in from the same IP, so that's not the issue. He hasn't exceeded the downloads or time limit, so that's not the issue.

In reviewing the logs, I see one other log entry like this, but that user was able to login and download the file a few minutes later.

What else can I look for to resolve this user's issue? (BTW, he was so frustrated that I've refunded his money already. I just want to prevent any future issues.)

Thanks,
Anne

PS: I checked through the site and didn't see anything like this.

Posts: 5245
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Anne, out of curiosity, is this a return customer with a lot of downloads? I'm trying to decipher the code and this error message is only in the code in one place... and it's a touch on the cryptic side. Sticking out tongue

The function in question is _file_download() in uc_file.module.

Posts: 23
Joined: 11/01/2007

Ryan, I studied his actions quite a bit. He's the only customer that I can find who actually set up a user account before purchasing. But I don't think that affects this. It appears that he must have been trying to use the link in his original download link email over and over. There is a log entry that he started the download but he reports that something failed. Of course, after that, he seems to have just clicked the first link, rather than going to his account page and downloading it there.

(The only way that I could replicate the issue was by doing that.)

I'm going to work on more customization for the download message, with instructions on how to get to the file.... and add more to my Help page.

In a related question, how would I go about "resetting" the file downloads for someone who has exceeded the download limit? (What hassles we go through to shortstop the bad guys.)

Thanks,
Anne

Posts: 1290
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

I think the only way is to go into the uc_file_users table and resetting the field where it has his access logs. For now... I think an Admin option (when viewing user/*/files) would be cool - a little "reset" button, that is, if the files are due to expire or the download limit has been met.

Although I think the way the email links are created is somewhat different, since they are "one-use-only" links. You might instruct him to just login to his account and download from his My Files area... if that's an option at this point.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 23
Joined: 11/01/2007

Thanks for the tip, torgosPizza. I would love a little "reset" button. That's one feature of my "old program" that Ubercart doesn't seem to have.

For this customer, that horse is already out of the barn. He was quite distressed about the entire transaction, even threatened to report me to PayPal as a scammer because he couldn't get the file to download. I'm just moving onto solving the issue so it doesn't happen to anyone else.

Anne

Posts: 5245
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Thanks for the help, Anne. Sorry you got stuck with a persnickety customer. We get folks like that every now and then through eBay and it can be a pain to deal with.

I like the idea of a reset button, and I'm also a little concerned after reviewing the File Downloads code. tP, do you know if it's going to stop a user from downloading any time they've reached 50 downloads in the store? Or am I misreading that function?

Posts: 1290
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Huh, hadn't noticed that before. It looks like UC_FILE_REQUEST_LIMIT is set to 50 (and there's nowhere to configure this in settings). I think Shawn had put that in there just to keep people from downloading a ton of files all at once, that way they can't overload the system. Although I'm not quite sure if it's really all that necessary at this point - will need to investigate.

I also just noticed this:

<?php
if ($requests = UC_FILE_REQUEST_LIMIT) {
     
watchdog('uc_file',$message_user.t("has been temporarily banned from file downloads."),WATCHDOG_WARNING);
    }
?>

The condition looks like it's not comparing the values, and is instead assigning the variable $requests the value of UC_FILE_REQUEST_LIMIT.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com