Protected Links
ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6
Back to this add-on's main page
View Other Add-ons From Yuri Salimovskiy
IP Address Not Allowed - Guest Access set to Yes
Support Request
Boyink
|
Posted: 24 May 2012 03:42 PM |
|
|
|
Hi -
I have this code:
{exp:protected_links:generate url=”{ebook_download_link}” guest_access=“yes” title=“Download {title} Now!”}
It generates the following error for non logged-in users:
Your IP address can not access this file
If I’m logged in then the generated link works fine.
|
|
|
Yuri Salimovskiy
|
Posted: 25 May 2012 12:41 AM |
# 1
|
|
Developer
|
You probably had once generated thins link with other parameters (IP lock on, or access to members only), so system remembers it.
To force re-generation, add new_link=“yes” parameter
|
|
|
Boyink
|
Posted: 25 May 2012 07:17 AM |
# 2
|
|
|
Ah ok. I’ll give that a go - thanks!
|
|
|
Boyink
|
Posted: 26 May 2012 07:20 AM |
# 3
|
|
|
Hi Yuri -
After adding that parameter it worked for me in a non-logged-in browser, but I had an email this morning that a customer was still getting the error referenced above.
|
|
|
Yuri Salimovskiy
|
Posted: 26 May 2012 09:49 AM |
# 4
|
|
Developer
|
Hm.
Did you keep the new_link=“yes” parameter or removed after testing yourself?
I suggest that you keep it for some time, to make sure everyone will get their links re-generated (because frontend-generated links are created for each visitor separately)
Or maybe the customer has used old link (cached, or saved on his computer)
|
|
|
Boyink
|
Posted: 26 May 2012 10:01 AM |
# 5
|
|
|
I left the parameter in, and this was a new customer. I also just double-checked that there is no caching going on at either the tag or template level.
|
|
|
Yuri Salimovskiy
|
Posted: 26 May 2012 02:24 PM |
# 6
|
|
Developer
|
Ok, looks like I have sort of fail in logic here… try replacing on line 84 of mod.protected_links.php
if ($q->row('bind_ip')!='' && $q->row('bind_ip')!=$this->EE->input->ip_address)
with
if ($q->row('bind_ip')!='' && $q->row('bind_ip')!=$this->EE->input->ip_address && $q->row('guest_access')=='n')
The new_link=“yes” parameter will probably be not necessary anymore
I’ll also add this to next release
|
|
|
Boyink
|
Posted: 30 May 2012 11:43 AM |
# 7
|
|
|
Hmm..
Line 84 already had that code?
|
|
|
Yuri Salimovskiy
|
Posted: 30 May 2012 02:07 PM |
# 8
|
|
Developer
|
notice added && $q->row(‘guest_access’)==‘n’
|
|
|
Boyink
|
Posted: 30 May 2012 04:01 PM |
# 9
|
|
|
Yes-it was all there exactly as the line you wanted me to update it to.
|
|
|
Yuri Salimovskiy
|
Posted: 31 May 2012 12:06 AM |
# 10
|
|
Developer
|
Hm. What version do you use? The latest is 1.9.1 (but still needs this line to be modified)
|
|
|
Boyink
|
Posted: 31 May 2012 07:50 AM |
# 11
|
|
|
My bad - when I looked at the version I downloaded the updated code is not there. I’m working on a slow connection - must have been successful at pasting the update in when I thought I wasn’t.
Sorry about that!
|
|
|
Yuri Salimovskiy
|
Posted: 31 May 2012 01:10 PM |
# 12
|
|
Developer
|
No problem. So is all working fine now?
|
|
|
Boyink
|
Posted: 31 May 2012 03:18 PM |
# 13
|
|
|
So far so good…will see if I hear complaints from customers..;)
|
|
|