verify_csrf throwing exception

mzibo

Joined: 2008-03-30
Posts: 12
Posted: Mon, 2009-06-08 21:16

When trying to save the "Filesystem path to your Gallery 2 embed.php file", I keep getting the error message below. I have tried both with Beta-1 as well as with the git master. This feature already worked for me in Alpha-4 btw.

Otherwise: great work, guys!

 So here's the error:
@todo FORBIDDEN

File: modules/gallery/helpers/access.php, line: 176
And here's how we got there:
    * modules/gallery/helpers/access.php [360]:
      access_Core::forbidden(  )
    * modules/g2_import/controllers/admin_g2_import.php [42]:
      access_Core::verify_csrf(  )
    *
      Admin_g2_import_Controller->save(  )
    * modules/gallery/controllers/admin.php [50]:
      call_user_func_array( Array
      (
          [0] => Admin_g2_import_Controller Object
              (
                  [theme:private] => 
                  [uri] => URI Object
                      (
                      )
                  [input] => Input Object
                      (
                          [use_xss_clean:protected] => 1
                          [magic_quotes_gpc:protected] => 1
                          [ip_address] => 
                      )
              )
          [1] => save
      )
       )
    *
      Admin_Controller->__call( g2_import, Array
      (
          [0] => save
      )
       )
    * system/core/Kohana.php [291]:
      ReflectionMethod->invokeArgs( Admin_Controller Object
      (
          [theme:private] => 
          [uri] => URI Object
              (
              )
          [input] => Input Object
              (
                  [use_xss_clean:protected] => 1
                  [magic_quotes_gpc:protected] => 1
                  [ip_address] => 
              )
      )
      , Array
      (
          [0] => g2_import
          [1] => Array
              (
                  [0] => save
              )
      )
       )
    *
      Kohana::instance(  )
    * system/core/Event.php [209]:
      call_user_func( Array
      (
          [0] => Kohana
          [1] => instance
      )
       )
    * system/core/Bootstrap.php [55]:
      Event::run( system.execute )
    * index.php [72]:
      require( system/core/Bootstrap.php )
 
mzibo

Joined: 2008-03-30
Posts: 12
Posted: Mon, 2009-06-08 21:29
 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2009-06-09 04:30

Hard to see how the csrf token could be missing there. I added a similar comment to the bug, too. Can you provide more details there please?
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest zip: http://github.com/gallery/gallery3/zipball/master
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
vonmax

Joined: 2007-04-16
Posts: 19
Posted: Wed, 2009-06-10 19:00

I have the same problem
any suggestion?
massi

 
mzibo

Joined: 2008-03-30
Posts: 12
Posted: Thu, 2009-06-11 10:52

the problem seems to arise when attempting to import multisite g2 installs, see http://gallery.menalto.com/node/88169 and https://apps.sourceforge.net/trac/gallery/ticket/377

 
vonmax

Joined: 2007-04-16
Posts: 19
Posted: Thu, 2009-06-11 15:58

tkx mzibo. I saw this topics, but I haven't multisite installation :(

 
UloPe

Joined: 2009-06-11
Posts: 9
Posted: Thu, 2009-06-11 18:43

Hi,

I'm having the same problem and I'm also not using a multisite install.

So here's the error:
@todo FORBIDDEN
File: modules/gallery/helpers/access.php, line: 176

And here's how we got there:
modules/gallery/helpers/access.php [360]:
access_Core::forbidden(  )
modules/g2_import/controllers/admin_g2_import.php [42]:
access_Core::verify_csrf(  )
Admin_g2_import_Controller->save(  )
modules/gallery/controllers/admin.php [50]:
call_user_func_array( Array
(
    [0] => Admin_g2_import_Controller Object
        (
            [theme:private] => 
            [uri] => URI Object
                (
                )

            [input] => Input Object
                (
                    [use_xss_clean:protected] => 1
                    [magic_quotes_gpc:protected] => 
                    [ip_address] => 
                )

        )

    [1] => save
)
 )
Admin_Controller->__call( g2_import, Array
(
    [0] => save
)
 )
system/core/Kohana.php [291]:
ReflectionMethod->invokeArgs( Admin_Controller Object
(
    [theme:private] => 
    [uri] => URI Object
        (
        )

    [input] => Input Object
        (
            [use_xss_clean:protected] => 1
            [magic_quotes_gpc:protected] => 
            [ip_address] => 
        )

)
, Array
(
    [0] => g2_import
    [1] => Array
        (
            [0] => save
        )

)
 )
Kohana::instance(  )
system/core/Event.php [209]:
call_user_func_array( Array
(
    [0] => Kohana
    [1] => instance
)
, Array
(
    [0] => 
)
 )
system/core/Bootstrap.php [55]:
Event::run( system.execute )
index.php [72]:
require( system/core/Bootstrap.php )
 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-06-12 08:25

Please zip up the contents of gallery3/var/modules/g2_import and attach it here.. that should help me track down the problem.
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest zip: http://github.com/gallery/gallery3/zipball/master
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
vonmax

Joined: 2007-04-16
Posts: 19
Posted: Fri, 2009-06-12 12:04

here's zip files
I deleted it from var/modules directory & now g2 import doesn't create a new var/modules/g2_import dir

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2009-06-13 01:13

Awesome, thanks! I think that I've fixed the problem now.. want to try with the latest code?
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest zip: http://github.com/gallery/gallery3/zipball/master
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
vonmax

Joined: 2007-04-16
Posts: 19
Posted: Wed, 2009-06-17 16:57

I need to upload all directory and reinstall gallery3 or only /modules/g2_import?
tkx

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2009-06-18 19:41

We're continually making changes all over the code. You should upgrade the whole thing at once. Read my instructions below.
---
Problems: Check gallery3/var/logs first!
file a bug or feature request | upgrade to the latest code | use git

 
vonmax

Joined: 2007-04-16
Posts: 19
Posted: Thu, 2009-06-18 20:32

nothing to do. I upgrade &i have the same problem :(

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-06-19 00:33

@vonmasx What version did you upgrade to? I committed a change today that should make most of the problems here go away so my guess is that you have a different problem. Please try again with the latest code, create a new forum topic and include whatever you've got in your gallery3/var/logs files and I'll investigate.
---
Problems: Check gallery3/var/logs first!
file a bug or feature request | upgrade to the latest code | use git