sessionauth.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php if (!defined('PmWiki')) exit();
  2. /* Copyright 2002-2003 Patrick R. Michaud (pmichaud@pobox.com)
  3. This file is part of PmWiki; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published
  5. by the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version. See pmwiki.php for full details.
  7. */
  8. session_start();
  9. $AuthFunction = 'SessionAuth';
  10. if (@$_POST['authpw'])
  11. $_SESSION['authpw'] = $_POST['authpw'];
  12. SDV($SessionAuthFmt,"<b>Password required</b><p>
  13. <form name='authform' action='{$_SERVER['REQUEST_URI']}'
  14. method='post'>Password:
  15. <input tabindex='1' type='password' name='authpw' value='' />
  16. <input type='submit' value='OK' />
  17. </form>");
  18. function SessionAuth($pagename,$level,$authprompt=true) {
  19. global $GroupAttributesFmt,$DefaultPasswords,
  20. $AllowPassword,$HTMLBodyFmt,$SessionAuthFmt;
  21. $page = ReadPage($pagename);
  22. if (!$page) { return false; }
  23. @$passwd = $page["passwd$level"];
  24. if ($passwd=="") {
  25. $grouppg = ReadPage(FmtPageName($GroupAttributesFmt,$pagename));
  26. @$passwd = $grouppg["passwd$level"];
  27. }
  28. if (crypt($AllowPassword,$passwd)==$passwd) return $page;
  29. if ($passwd=="") { $passwd=@$DefaultPasswords[$level]; }
  30. if ($passwd=="") return $page;
  31. $authpw = $_SESSION['authpw'];
  32. foreach(array_merge($DefaultPasswords['admin'],$passwd) as $pw)
  33. if (crypt($authpw,$pw)==$pw) return $page;
  34. if (!$authprompt) return false;
  35. $HTMLBodyFmt = str_replace('<body ',
  36. '<body onload="document.authform.authpw.focus()" ',$HTMLBodyFmt);
  37. $action = $GLOBALS['action'];
  38. StartHTML($pagename,"Authorization required");
  39. PrintFmt($pagename,$SessionAuthFmt);
  40. EndHTML();
  41. exit;
  42. }
  43. ?>
PANIC: session(release): write data/sessions/2/e/2ef794c593eb4be4: no space left on device

PANIC

session(release): write data/sessions/2/e/2ef794c593eb4be4: no space left on device
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/session@v1.0.3/session.go:204 (0xb13e07)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:80 (0x967b75)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:114 (0x967bf6)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/recovery.go:161 (0x15baec4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/logger.go:40 (0x96b257)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:187 (0x972959)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:304 (0x973a01)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/macaron.go:218 (0x96c572)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:3311 (0x85a5cd)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:2073 (0x837f6f)
/my/cache/.heroku/go/go1.26.3/go/src/runtime/asm_amd64.s:1771 (0x493380)