   Link: [1]home

                    

     ----------------------------------------------------------------------

    

   

     <[2]cray@neural.ru>

   +------------------------------------------------------------------------+
   |                                                      |
   |------------------------------------------------------------------------|
   |  0.2                        | 18 Aug 2003                       |
   |------------------------------------------------------------------------|
   |    Zope2.6.1.                                       |
   |------------------------------------------------------------------------|
   |  0.1                        | 9 Nov 2002                        |
   |------------------------------------------------------------------------|
   |   DocBook  ,     |
   |     .                          |
   +------------------------------------------------------------------------+

     ----------------------------------------------------------------------

     Zope   , 
     ,    
    ,    , 
       .    
        ,  . 
           
       .     
     ,     --
   <[3]cray@neural.ru>.

      

            
   ,      .   
      (..    __init__.py) 
       /usr/lib/zope/lib/python/Products,   --
     /var/lib/zope/<  >/Products.

         .

           tar ( , 
        www.zope.org)     RPM (
         ).

    RPM -- -  ,   RPM,   Python,
       ,      rpm
   -ivh < >.  ,     
    /usr/lib/zope/lib/python/Products   /var/lib/zope/<
    >/Products.      
      *.pyc: rm -i *.pyc.    ,
     *.pyc,    ,  
       Python.

    ݣ     --    zexp (xml),
        ImportSite.txt.

     ԣ    ,  ,   
           ,
          URL
   [4]http://zope.localdomain:8080/Control_Panel/Products/manage_main  
     ,   "manager".

      AqGuard:    

   ,      
   Zope,  ,       
     URL.  URL  , , 
       . ,  URL
   [5]http://zope.locadomain/Search/Forum   
    URL 

 "http://zope.locadomain/Search/" + "Search/" * n + "Forum"

   ,  n = [0:+inf].     ,    
   ,         
   HTML    :      
   " ", ..  

 "http://zope.locadomain/Search/" + "Search/" * n + "Forum"

   ,      ,    :

 "http://zope.locadomain/Search/" + "Search/" * (n + 1) + "Forum"

   ,

   , ,    ,    ,
          ,    : 
    n        
     DoS-.     --
    :

 <a href="<dtml-var URLPATH0>/<dtml-var "getId()">"> _. </a>;

 <a href="<dtml-var "getId()">"> _. </a>

      ,   base  
   .   ,     HTML 
      -- ޣ  ۣ 
          . - 
           HTML,   
     --   .

    AqGuard    :  
   url-          
     .    , 
   AqGuard   AqGuardBlocked   
   .

           AqGuard   :

    1.  ,     ;

    2.    Zope  # service zope
       restart <_>

    3.     Zope  URL 
       http://zope.localdomain/manage

    4.   ,        
          .

    5.       AqGuard.   
       AqGuard --       Zope.

    6.    AqGuard    "".

    7.   AqGuard    ,  
             
         max_repeats:     AqGuard
           ͣ      
            ң .

    8.  AqGuard   use_aqguard.

    9.  ݣ  URL,    -- 
           :     Σ
          DTML- :

 standard_error_message

           .

       AqGuard    --  
   ,    .

      FloodGuard:   

    --  ,   ,  - 
       ,      , 
              
   - ޣ .   ,      
     ģ,    ģ,   ģ  
    ,      
    HTTP, HTML, TCP/IP     .

    FloodGuard , ,  ,  ݣ 
   :      
    ۣ         
   IP-.        , ,
           ͣ .

        ,
   ֣    .  
       FloodGuardBlocked;

          

      ,     ,   
     ,   :

    1.     Zope  URL 
       [6]http://zope.localdomain/manage

    2.   ,  ,    
          .

    3.    FloodGuard,    FloodGuard, 
          Zope  .

    4.    FloodGuard    "".

    5.      ,   
          use_referer --   ,  
             HTTP_REFERER
       ,          ,   ,
          (    
        ,        
        .

    6.     :  ,  
            .

    7.   use_floodguard.

    8.    ,   ;

    9.        
       ,       
        DTML-:

 standard_error_message

           .

    FloodGuard      IP-. 
   Zope  -,     IP- 
    ip,   , ,    
   /etc/httpd/conf/zope_proxy.conf:    ip, 
     URL   :ipset.    FloodGuard
            
    ip      :   
    !

      IP-    HTTP/1.1
   proxy ( apache > 1.3.27).     ,  
     use_http11. ,  - 
    IP-   .

       IP   ,  
       REMOTE_ADDR  ,  
   .

      RequestDecoder:       ;)

         
     ,   ,     
     ,     
   .   ,    
     charset,  ,    
      .      
   Microsoft     ,   
   .

    

               ,     
             ,     
                 .

   

             .

   

                
                
                  
           .

             RequestDecoder     
              , 
             .

          

         :

    1.     Zope  URL 
       http://zope.localdomain/manage

    2.   ,  ,    
           (,  ).

    3.    RequestDecoder (  
       RequestDecoder,     Zope  ).

    4.    RequestDecoder    "".

    5.      ,   
          use_censor --   ,  
            ,  
         ,       
       :    ,   
       SemanticGuard --     .

    6.     ,   
       ,    .   
           .

    7.   ,  RequestDecoder    , 
          use_decoder.

    8.    CrayFIX,      ,
           RequestDecoder   .

    9.      ""     
       ,    .  
       , RequestDecoder    KOI8-R 
       Windows1251.

        SemanticGuard:  

   RequestDecoder     SemanticGuard --
   ,      ݣ   
       Uncensored.  
        ,  
       ,    
   .      ,   
       --   ţ  
   ,   ,   , , ,
       .

      psycopg

   API     PostgreSQL     Python.  
        Z,  
    postgresql.    rpm ;)

      psycopg-ZPsycopgDA:     postgresql

         
    Zope     PostgreSQL.  
    ,    .

        ,     
           PostgreSQL 
   ,    .    
    --   :

 export PGCLIENTENCODING=< >

     /etc/sysconfig/zope/<  >,  
         postgresql.

   ,     set clientencoding  
    :  ,    ,  ݣ 
   ģ        
   .

      MySQL-python

   API     MySQL     Python.  
        Zope,  
    MySQL.    RPM.

      ZMySQLDA:     mysql

         
    Zope     MySQL.   
   ,    . :   
         . 
    ,        
    ,    - ,  
       ,    
   .

          --   .

      mysqlUserFolder: " ",   mysql

      Zope   API   ޣ
    .      API --
   mysqlUserFolder,        MySQL.
     mysqlUserFolder    
   ,        . 
     .    .

          

           
   :

    1.   MySQL   ޣ  ;

    2.      
       /usr/lib/zope/lib/python/Products/mysqlUserFolder/sql/create_tables.sql

    3.     Zope  URL 
       [7]http://zope.localdomain/manage;

    4.   ,     ޣ ,
          ;

    5.       mysqlUserFolder,  
         acl_users.     
           mysqlUserFolder;

    6.   acl_users     "Manage Users";

    7.   "Create User"    ,   Role 
       Manager.

    8.      ,  
       ,     ,   
           .

    9.  ,       -- Manager 
       Anonymous.         
           Roles    
       MySQL,     Zope.

      

          
   ,     -   
   .

     ----------------------------------------------------------------------
