Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

webcalendar / invalid referring url

donpa49
2012-03-04
2013-01-15
1 2 > >> (Page 1 of 2)
  • donpa49
    donpa49
    2012-03-04

    I have webcalendar up and running. After logging in and try to go to system settings I get Invalid referring URL.
    Any suggestions how to fix this problem. Thanks.

     
  • srmorton
    srmorton
    2012-03-04

    I've seen a simular issue as this on this forum, but don't know were it is now. I beleive it has something to do with the web server settings. What system are you using? That may help jog my memory.

    Steve

     
  • donpa49
    donpa49
    2012-03-04

    Apache on a hosted server..

    Don

     
  • donpa49
    donpa49
    2012-03-05

    I have got the problems resolved.

     
  • Silvio
    Silvio
    2012-03-05

    Hi Don,
    how do you solved it?
    I have same problem.

    Silvio

     
  • monican
    monican
    2012-03-06

    I also have the same problem when trying to review the unapproved events page.  Can you share how you resolved the problem Don?  Thanks so much in advance for your help!

     
  • donpa49
    donpa49
    2012-03-07

    Sorry, this is not fixed. The first time in installed this was unzipping on pc, then uploaded to server. Since that did not work, I deleted all and unzipped on server. It worked one time, that is why I posted that the problem was resolved.. but the next time I logged in I could not add events or go to system settings…

     
  • srmorton
    srmorton
    2012-03-07

    After you moved the files to the web host servers did you run the install wizard for Webcalendar? Is the Database on the web host servers? Also, when you installed on the web host did you elect to use the db cache if so edit your settings.php file and remove that line.

    What version of PHP is your web host running?

    Steve

     
  • Silvio
    Silvio
    2012-03-07

    Hi all,
    i tried these three different configurations (alls standalone servers):

    O.S: Linux Centos 5.6
    MySql: 5.0.77
    Apache: 2.2.3
    PHP: 5.3.3

    O.S: Linux CentOS 5.0
    MySql: 5.0.22
    Apache: 2.2.3
    PHP: 5.1.16

    O.S: Windows 7
    MySql: 5.1.50
    Apache: 2.2.16
    PHP: 5.2.14

    I tried also removing the db cache row from settings.php and moving folder tmp to differente positions with 777 permissions.

    All these installations showed the problem.
    In my cases the error message "invalid referring URL" appears only using Internet Explorer and selecting "Preferences" (pref.php) or "System Settings" (admin.php).
    Using Firefox "Preferences" and "System Settings" are showed correctly.
    But I need to support Internet Explorer …

    Do you have some suggestions?

    Thanks in advance
    Silvio

     
  • srmorton
    srmorton
    2012-03-08

    You did not say what version of IE version you are using? I'm running IE 9 and have 4 or 5 installations of WebCalendar. I'm not seeing this issue. I would try a different PC if you can. It could be the configuration of the IE on the PC you are working on. If you want to setup a test user and PM me I would be glad to test for you.

    Steve

     
  • Craig Knudsen
    Craig Knudsen
    2012-03-08

    Could be a WebCalendar bug. It could be that MSIE is not sending the referer info in the same manner.

    Has anyone else had this problem with MSIE?  (Or not had this problem with MSIE on WebCalendar 1.2.5?)

     
  • Craig Knudsen
    Craig Knudsen
    2012-03-08

    I tested with MSIE 8 and had no problems.  It sounds like the problem is that certain versions of IE don't provide HTTP_REFERER info in the HTTP header.  For background, the change the may be causing this was made to prevent CSRF.  More info on CSRF can be found here.

    If you continue to have problems, you can simply change the implementation of the function to just "return true;" to disable it.

     
  • Robert Pruitt
    Robert Pruitt
    2012-03-08

    WebCalendar1.2.3
    IE8
    PHP 5.3.9
    Apache 2.2.3
    CentOS 5
    MySQL 5.5.17

    Works as expected.

     
  • Craig Knudsen
    Craig Knudsen
    2012-03-09

    this issue is only present in 1.2.5

     
  • I was problems with Firefox on Debian Squeeze and webcalendar over Apache with name-based SSL virtual hosts.

    A miserable solution… I disabled the check in includes/functions.php file.

    See the changes (diff):


    -- functions.php.orig  2012-03-09 00:45:06.661836281 -0300
    +++ functions.php       2012-03-09 00:41:07.841834980 -0300
    @@ -6118,7 +6118,7 @@
    {
       global $SERVER_URL;

    -  if ( empty( $_SERVER ) ) {
    +/*  if ( empty( $_SERVER ) ) {
         // Missing the REFERER value
         die_miserable_death ( translate ( 'Invalid referring URL' ) );
       }
    @@ -6129,7 +6129,7 @@
         // However, you're not supposed to do that with this version of
         // WebCalendar anyhow…)
         die_miserable_death ( translate ( 'Invalid referring URL' ) );
    -  }
    +  } */
    }

    ?>


    Not nice… But works!

    Regards,

    Eriberto - Brazil

     
  • Silvio
    Silvio
    2012-03-09

    My versions are:
    MSIE  8
    Webacalendar 1.2.5

    I applied the solution posted by eriberto, and now "Prefs" and "Sys Settings" works.
    Thanks

     
  • Jimmy
    Jimmy
    2012-04-05

    I am using Macintosh Safari browser.  In version 4.1.3 the "Invalid referring URL" error does not occur. However, with Safari version 5.1.5 the error does occur.  The fix indicated for IE doesn't work. That is, commenting out the first "die_miserable_death" doesn't solve the problem. However, commenting out the second one does. Here is the modified function as it works with Safari 5.1.5 and Google Chrome (18.0.1025.142):

    function require_valide_referring_url ()
    {
      global $SERVER_URL;

      if ( empty( $_SERVER ) ) {
        // Missing the REFERER value
        die_miserable_death ( translate ( 'Invalid referring URL' ) );
      }
      if ( ! preg_match ( "@$SERVER_URL@i", $_SERVER ) ) {
        // Gotcha.  URL of referring page is not the same as our server.
        // This can be an instance of XSRF.
        // (This may also happen when more than address is used for your server.
        // However, you're not supposed to do that with this version of
        // WebCalendar anyhow…)
        //die_miserable_death ( translate ( 'Invalid referring URL' ) );
      }
    }

     
  • Yes, this is the problem. My question is why.
    I verified that the url changed, i don't know why. In my case this happen when i working on server on localhost.
    So i put the http://server_address/webcalendar and after login or other operation, this change, become
    http://localhost/webcalendar.
    I think in some place (apache/php/os configuration) take this server name…
    I use linux (ubuntu 10.04 LTS server), this 'localhost' it's not my server name!

     
  • Dave Meldrum
    Dave Meldrum
    2012-05-13

    One of my users has the same problem.  Interestingly, if she logs into a different Windows account, the problem disappears.  Also for a while she could use Firefox, but now that also fails.  So this something about the client side of things.  Is there a cookie involved here that gets corrupted after the user logs in several times?  Other users do not have a problem. 

     
  • Stevo
    Stevo
    2012-06-08

    having same issue

     

  • Anonymous
    2012-06-26

    I too am having this issue. OSX10.7 Chrome 19. Webserver is LAMP hosted by GreenGeeks.

     

  • Anonymous
    2012-07-19

    This error starting happening with me when I altered .htaccess in home folder to force SSL on my entire website.
    If I remove the following from the .htaccess

    RewriteEngine On 
    RewriteCond %{SERVER_PORT} 80 
    RewriteRule ^(.*)$ https://www.beaumcelhattan.com/$1 [R,L]
    

    everything works fine again. 
    Is there a way to fix this?  I use the calendar from multiple locations and wish to utilize SSL at all times.
    thanks.

     

  • Anonymous
    2012-07-20

    Ok, figured it out.
    I had to go into the database and set the SERVER_URL field in table webcal_config to https://domain, instead of http://domain
    works like a charm now.

     
  • Angelos
    Angelos
    2012-07-25

    i used shasta309 solution and it worked fine
    thanks!

     
1 2 > >> (Page 1 of 2)