PacketFence - BTS - PacketFence
View Issue Details
0001307PacketFencecaptive portalpublic2011-10-13 09:212012-10-19 12:35
fgaudreault 
fgaudreault 
highmajorrandom
resolvedfixed 
3.0.1 
3.5.0 
0001307: Redirection after registration is not working well
As seen on site with a client lately, more browsers appears to have issues with the Javascript redirection after the registration :
- IE8 - that one we already knew
- IE9 - We are receiving a 403 after the redirection
- Safari (Lion) - We are not redirected
- BlackBerry Browser - We are not redirected

 

As a work-around you can disable the broken javascript-based redirection by adding the following in conf/pf.conf:

[captive_portal]
network_detection=disabled
No tags attached.
Issue History
2011-10-13 09:21fgaudreaultNew Issue
2011-10-14 08:42obilodeauNote Added: 0002346
2011-10-14 08:42obilodeauTarget Version => +1
2011-10-14 11:05francisNote Added: 0002358
2012-01-30 09:59obilodeauNote Added: 0002559
2012-01-30 10:09obilodeauDescription Updated
2012-10-19 12:35fgaudreaultNote Added: 0003156
2012-10-19 12:35fgaudreaultStatusnew => resolved
2012-10-19 12:35fgaudreaultResolutionopen => fixed
2012-10-19 12:35fgaudreaultAssigned To => fgaudreault
2012-10-19 12:35fgaudreaultTarget Versiongeneral => 3.5.0

Notes
(0002346)
obilodeau   
2011-10-14 08:42   
I'm thinking that we might want to enable the javascript redirection on "known to be working browsers" and fallback to a progress bar then a "it should work open a new tab or window" message to all unknown or known-not-to-work browsers.

It would improve the situation instantly for android, kindle, black berry, playstation, etc. And the redirection is still sexy for good browsers.
(0002358)
francis   
2011-10-14 11:05   
Could someone test this patch?

--- pf/html/common/pf.js 9249a03a53d92fb76df43908d5573fc3a0d1b6a0
+++ pf/html/common/pf.js d54fbb9deeb02d8598e7ca438e80a717a17341c0
@@ -71,7 +71,8 @@ function performRedirect(destination_url
  Simple wrapper to redirect the browser. The wrapper enables us to call the redirect with .delay().
  */
 function performRedirect(destination_url) {
- top.location.replace(destination_url.unescapeHTML());
+ window.location.href = destination_url.unescapeHTML();
 }
 
 /**
(0002559)
obilodeau   
2012-01-30 09:59   
Mailing list user Ahmed Sabry Raghib Saad <Ahmed.Sabry@EtisalatData.net> confirmed it's not working on his blackberry on the blackberry browser.
(0003156)
fgaudreault   
2012-10-19 12:35   
Not heard anything about that lately. Worst case, disable the feature in the configuration.

Re-Open if you still have issues.