Subversion Repositories wimsdev

Rev

Rev 23 | Rev 1373 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
!if robot isin $session
2
 error=robot
3
 !exit
4
!endif
5
 
6
!if $job=$empty
391 obado 7
 error=wrong request: no job
23 reyssat 8
 !exit
9
!endif
10
 
11
code=!word 1 of $code
12
!if $code=$empty
13
 error=random code not defined
14
 !exit
15
!endif
16
 
17
ident=!word 1 of $ident
18
ident=!text select -_$char_alnum in $ident
19
!if $ident=$empty
20
 error=identification failure
21
 !exit
22
!endif
23
 
24
!readdef wimshome/log/classes/.connections/$ident
25
ident_agent=!translate internal ./,; to $          $ in $ident_agent
26
ident_agent=!word 1 of $ident_agent
27
ident_site=!items2words $ident_site
28
passwd=!text select $char_alnum in $passwd
29
agent=!translate internal ./,; to $          $ in $httpd_HTTP_USER_AGENT
30
agent=!word 1 of $agent
31
protocol=!translate internal : to $ $ in $wims_ref_name
32
protocol=!word 1 of $protocol
33
 
34
!if ($ident_allow!=$empty and $job notwordof $ident_allow) or \
35
	($ident_deny!=$empty and $job iswordof $ident_deny)
36
 error=illegal job
37
 !exit
38
!endif
39
 
391 obado 40
 
41
!if $ident_type=$empty or $passwd != $ident_password 
42
error=Identification Failure : bad login/pwd
23 reyssat 43
 !exit
44
!endif
45
 
391 obado 46
!if $httpd_REMOTE_ADDR notwordof $ident_site
47
error=Identification Failure : bad IP ($httpd_REMOTE_ADDR is not $ident_site)
48
 !exit
49
!endif
50
 
51
!if ($ident_agent!=$empty and $agent != $ident_agent)
52
error=Identification Failure : $agent is a bad Agent
53
 !exit
54
!endif
55
 
56
!if ($ident_protocol=https and $protocol != https)
57
error=Identification Failure : bad Protocol
58
 !exit
59
!endif