Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Closed)
 (v3.4.03) BUG+FIX: admin_mod_dbsetup.asp
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Deleted
deleted

4116 Posts

Posted - 24 September 2002 :  12:37:30  Show Profile
I was logged in as non-main-admin, tried to install a mod, and it asked me to log in as main admin. I did so, and it crashed:

quote:

Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'sha256'
/forumv34_03/inc_header.asp, line 190



Further examination showed that the includes in two versions of admin_mod_dbsetup are different. I'm not sure about inc_func_common.asp, but there must be inc_sha256 include... [edit]Both must be there...[/edit]

Around lines 46-48 in admin_mod_dbsetup.asp, change

%>
<!--#include file="inc_header.asp"-->
<%

to

%>
<!--#INCLUDE FILE="inc_func_common.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp"-->
<%


Stop the WAR!

Edited by - Davio on 07 March 2003 20:33:55

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 10 February 2003 :  23:33:25  Show Profile
Your code is correct, but to be consistent with the other admin files, the includes come before any asp code.

In admin_mod_dbsetup.asp, change lines 39 - 41 from this:
%>
<!--#include file="config.asp"-->
<%
to this:
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp"-->
<%
The inc_func_common.asp file isn't needed.
And remove lines 46 - 48:
%>
<!--#include file="inc_header.asp"-->
<%

Support Snitz Forums
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 12 February 2003 :  03:27:42  Show Profile
I think the inc_header.asp must come after the check of being an admin because that include writes into the browser and the test redirects (will fail after something is written).

The correct code here will be:

%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_func_admin.asp"-->
<%
Call chkAdminOrRedirect()
%>
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp"-->
<%


Where Call chkAdminOrRedirect() is a generalized replacement for existing authentication control code:

if Session(strCookieURL & "Approval") <> "15916941253" then
	scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
	Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if


[edit]removed the "inc_func_common.asp" from includes[/edit]

Stop the WAR!

Edited by - Deleted on 12 February 2003 06:19:23
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 12 February 2003 :  04:03:23  Show Profile
inc_func_common.asp is already included in both inc_header.asp and inc_header_short.asp

where are you putting the chkAdminOrRedirect() ?
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 12 February 2003 :  06:17:28  Show Profile
quote:
Originally posted by RichardKinser

inc_func_common.asp is already included in both inc_header.asp and inc_header_short.asp

where are you putting the chkAdminOrRedirect() ?


Again the same oversight... I keep it putting in because it is included in v3.4.03's admin_mod_config2.asp as in the following code:

'#################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<%
if Session(strCookieURL & "Approval") <> "15916941253" then
	scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
	Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if
%>
<!--#INCLUDE FILE="inc_func_common.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp"-->
<%
Response.Write	"      <table border=""0"" width=""100%"">" & vbNewLine & _

I removed them from both admin_mod_config.asp and admin_mod_config2.asp... I also corrected the code given in the above post...

The common admin section related functions are collected in inc_func_admin.asp file and dropped the size of the admin_*.asp files considerably.

Stop the WAR!
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 12 February 2003 :  07:32:15  Show Profile
I don't see any problems with your changes bozden.

Support Snitz Forums
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 12 February 2003 :  07:42:22  Show Profile
OK then Implemented in v4b04a03 with Richard's correction

Stop the WAR!
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 07 March 2003 :  20:30:38  Show Profile
Fixed in 3.4.04

I didn't make the change of moving the function to the inc_func_admin.asp file. Since that wasn't part of the fix.

Support Snitz Forums

Edited by - Davio on 07 March 2003 20:33:00
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07