Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #47848

Re: Wrong website loaded when other requested

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <joel.goldstick@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'else:': 0.03; 'elif': 0.05; 'skip:\\ 20': 0.07; 'username,': 0.07; 'skip:/ 10': 0.09; 'skip:\\ 40': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'template': 0.14; 'concatenated': 0.16; 'fallback': 0.16; "skip:' 60": 0.16; 'subject:when': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'wed,': 0.18; "skip:' 30": 0.19; 'cc:addr:python.org': 0.22; 'error': 0.23; 'skip:% 10': 0.24; 'why.': 0.24; 'cc:2**0': 0.24; 'script': 0.25; 'skip:" 40': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'skip:p 30': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'code': 0.31; "skip:' 10": 0.31; 'that.': 0.31; 'skip:7 10': 0.31; 'skip:= 20': 0.31; 'subject:other': 0.31; 'subject:website': 0.31; 'file': 0.32; 'stuff': 0.32; 'url:python': 0.33; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'url:org': 0.36; 'received:209': 0.37; 'skip:& 10': 0.38; 'pm,': 0.38; 'skip:& 20': 0.39; '12,': 0.39; 'skip:p 20': 0.39; 'url:mail': 0.40; 'wall': 0.65; '8bit%:100': 0.72; 'repeat': 0.74; '.....': 0.78; 'text/html;': 0.84; 'to:addr:support': 0.84; 'joel': 0.91; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=YvbzuZq8k8yifKk+FX1+Oal+au1qSSa9imfC+9wzHsk=; b=jfzOZryB8O0ZO5WDYOSlfQjjdCVORKc2BIwYnqFV51VDWbbqlOnyX6cMiva8qH6UnV E93VjiFt54ZbeQOX6IEiyvVV8zt8iDa4QY7Q0fzqZOG97R/l0w8Ei+A09Tb6leoKqLoa WBYCzqV0EJ6a8wDkcjD4CtQ/lMQJtzV8Lq6/pbtnn72X31cVs3KX2NzK3byGggTw28in qVdbg2lWSXwQL+kIw5PfrMfbCZbg3xBNrM3tYEw8NuFtmB610T/DuKgy4MsMoWlSrRfZ V7jVc+59i5gwqnJUETM5iDn3RB5pBqaHMsVJuqGRjwa3qkBKLkc7hXcD20XK/vdluxyg VZzQ==
MIME-Version 1.0
X-Received by 10.58.248.39 with SMTP id yj7mr10171371vec.53.1371069355366; Wed, 12 Jun 2013 13:35:55 -0700 (PDT)
In-Reply-To <kpabcm$275g$6@news.ntua.gr>
References <kpabcm$275g$6@news.ntua.gr>
Date Wed, 12 Jun 2013 16:35:55 -0400
Subject Re: Wrong website loaded when other requested
From Joel Goldstick <joel.goldstick@gmail.com>
To Νικόλαος Κούρας <support@superhost.gr>
Content-Type multipart/alternative; boundary=047d7bdc8524e3a7c404defaf55a
Cc "python-list@python.org" <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3131.1371069364.3114.python-list@python.org> (permalink)
Lines 192
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1371069364 news.xs4all.nl 15882 [2001:888:2000:d::a6]:57601
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:47848

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Wed, Jun 12, 2013 at 1:33 PM, Νικόλαος Κούρας <support@superhost.gr>wrote:

> ======================
> RewriteEngine Off
> RewriteCond %{REQUEST_FILENAME} -f
> RewriteRule ^/?(.+\.html) /cgi-bin/metrites.py?file=%{**REQUEST_FILENAME}
> [L,PT,QSA]
> ======================
>
> [code]
> file = form.getvalue('file')
> page = form.getvalue('page')
>
> if not page and os.path.exists( file ):
>         # it is an html template
>         page = file.replace( '/home/dauwin/public_html/', '' )
> elif page or form.getvalue('show'):
>         # it is a python script
>         page = page..replace( '/home/dauwin/public_html/cgi-**bin/', '' )
> else:
>         #when everything else fails fallback
>         page = "index.html"
>
> ....
> ....
>
>         if page.endswith('.html'):
>                 with open( '/home/dauwin/public_html/' + page,
> encoding='utf-8' ) as f:
>                         htmlpage = f.read()
>                 htmlpage = htmlpage % (quote, music)
>                 template = htmlpage + counter
>         elif page.endswith('.py'):
>                 pypage = subprocess.check_output(
> '/home/dauwin/public_html/cgi-**bin/' + page )
>                 pypage = pypage.decode('utf-8').**replace( 'Content-type:
> text/html; charset=utf-8', '' )
>                 template = pypage + counter
>
>         print( template )
> [/code]
>
> Everything as you see point to 'dauwin' username, yet the error still says:
>
> [code]
> [Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173]   File
> "/home/nikos/public_html/cgi-**bin/metrites.py", line 219, in <module>,
> referer: http://superhost.gr/
> [Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173]     with open(
> '/home/nikos/public_html/' + page, encoding='utf-8' ) as f:, referer:
> http://superhost.gr/
> [Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173]
> FileNotFoundError: [Errno 2] \\u0394\\u03b5\\u03bd
> \\u03c5\\u03c0\\u03ac\\u03c1\\**u03c7\\u03b5\\u03b9
> \\u03c4\\u03ad\\u03c4\\u03bf\\**u03b9\\u03bf
> \\u03b1\\u03c1\\u03c7\\u03b5\\**u03af\\u03bf \\u03ae
> \\u03ba\\u03b1\\u03c4\\u03ac\\**u03bb\\u03bf\\u03b3\\u03bf\\**u03c2:
> '/home/nikos/public_html//**home/dauwin/public_html/index.**html',
> referer: http://superhost.gr/
> [/code]
>
>
> Notice that you have the file path you want concatenated to your
/home/nikos/... stuff in the line above.  Look in your code to find out
why. Fix that.  Lather, rinse, repeat

> Why is pointing to /home/nikos isntead of /home/dauwin ?
>
> this is what a smash my head to the wall to understand.
> --
> http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list>
>



-- 
Joel Goldstick
http://joelgoldstick.com

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Wrong website loaded when other requested Νικόλαος Κούρας <support@superhost.gr> - 2013-06-12 20:33 +0300
  Re: Wrong website loaded when other requested Νικόλαος Κούρας <support@superhost.gr> - 2013-06-12 23:03 +0300
    Re: Wrong website loaded when other requested Nick the Gr33k <support@superhost.gr> - 2013-06-13 21:10 +0300
      Re: Wrong website loaded when other requested Joel Goldstick <joel.goldstick@gmail.com> - 2013-06-13 14:28 -0400
        Re: Wrong website loaded when other requested Nick the Gr33k <support@superhost.gr> - 2013-06-13 21:43 +0300
        Re: Wrong website loaded when other requested Nick the Gr33k <support@superhost.gr> - 2013-06-14 10:40 +0300
      Re: Wrong website loaded when other requested Andreas Perstinger <andipersti@gmail.com> - 2013-06-13 20:37 +0200
        Re: Wrong website loaded when other requested Nick the Gr33k <support@superhost.gr> - 2013-06-13 21:47 +0300
          Re: Wrong website loaded when other requested Grant Edwards <invalid@invalid.invalid> - 2013-06-13 19:31 +0000
            Re: Wrong website loaded when other requested Nick the Gr33k <support@superhost.gr> - 2013-06-14 09:14 +0300
              Re: Wrong website loaded when other requested Chris Angelico <rosuav@gmail.com> - 2013-06-14 17:24 +1000
              Re: Wrong website loaded when other requested Grant Edwards <invalid@invalid.invalid> - 2013-06-14 14:44 +0000
  Re: Wrong website loaded when other requested Chris Angelico <rosuav@gmail.com> - 2013-06-13 06:19 +1000
  Re: Wrong website loaded when other requested Joel Goldstick <joel.goldstick@gmail.com> - 2013-06-12 16:35 -0400
    Re: Wrong website loaded when other requested Νικόλαος Κούρας <support@superhost.gr> - 2013-06-13 09:41 +0300
      Re: Wrong website loaded when other requested Νικόλαος Κούρας <support@superhost.gr> - 2013-06-13 17:23 +0300
        Re: Wrong website loaded when other requested Chris Angelico <rosuav@gmail.com> - 2013-06-14 00:28 +1000
          Re: Wrong website loaded when other requested rusi <rustompmody@gmail.com> - 2013-06-13 09:47 -0700
        Re: Wrong website loaded when other requested Thomas Murphy <thomasmurphymusic@gmail.com> - 2013-06-13 10:48 -0400
        Re: Wrong website loaded when other requested Andreas Perstinger <andipersti@gmail.com> - 2013-06-13 16:54 +0200
          Re: Wrong website loaded when other requested Νικόλαος Κούρας <support@superhost.gr> - 2013-06-13 19:23 +0300
            Re: Wrong website loaded when other requested Chris Angelico <rosuav@gmail.com> - 2013-06-14 02:28 +1000
              Re: Wrong website loaded when other requested Νικόλαος Κούρας <support@superhost.gr> - 2013-06-13 20:03 +0300
        Re: Wrong website loaded when other requested Chris Angelico <rosuav@gmail.com> - 2013-06-14 01:11 +1000
          Re: Wrong website loaded when other requested Νικόλαος Κούρας <support@superhost.gr> - 2013-06-13 19:24 +0300
            RFD: rename comp.lang.python to comp.support.superhost alex23 <wuwei23@gmail.com> - 2013-06-13 20:25 -0700
              Re: RFD: rename comp.lang.python to comp.support.superhost Fábio Santos <fabiosantosart@gmail.com> - 2013-06-14 09:41 +0100
              Re: RFD: rename comp.lang.python to comp.support.superhost Roy Smith <roy@panix.com> - 2013-06-14 08:06 -0400
                Re: RFD: rename comp.lang.python to comp.support.superhost Gene Heskett <gheskett@wdtv.com> - 2013-06-14 08:47 -0400
                Re: RFD: rename comp.lang.python to comp.support.superhost Zero Piraeus <schesis@gmail.com> - 2013-06-14 09:06 -0400
                Re: RFD: rename comp.lang.python to comp.support.superhost Ben Finney <ben+python@benfinney.id.au> - 2013-06-15 10:26 +1000
              Re: RFD: rename comp.lang.python to comp.support.superhost Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-06-15 19:11 +0200
                Re: RFD: rename comp.lang.python to comp.support.superhost Nick the Gr33k <support@superhost.gr> - 2013-06-15 20:29 +0300
                Re: RFD: rename comp.lang.python to comp.support.superhost rusi <rustompmody@gmail.com> - 2013-06-15 10:39 -0700
                Re: RFD: rename comp.lang.python to comp.support.superhost Fábio Santos <fabiosantosart@gmail.com> - 2013-06-15 18:43 +0100
                Re: RFD: rename comp.lang.python to comp.support.superhost Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 18:43 +0100
                Re: RFD: rename comp.lang.python to comp.support.superhost Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-15 17:51 +0000
                Re: RFD: rename comp.lang.python to comp.support.superhost Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-15 19:26 +0100
                Re: RFD: rename comp.lang.python to comp.support.superhost Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-06-16 20:47 +0200
                Re: RFD: rename comp.lang.python to comp.support.superhost Alister <alister.ware@ntlworld.com> - 2013-06-15 17:52 +0000
                Re: RFD: rename comp.lang.python to comp.support.superhost Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-06-15 20:07 +0200
                Re: RFD: rename comp.lang.python to comp.support.superhost Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-06-15 19:55 +0200
        Re: Wrong website loaded when other requested Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-14 10:56 +0100
  Re: Wrong website loaded when other requested Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-13 14:04 +0100
  Re: Wrong website loaded when other requested Joel Goldstick <joel.goldstick@gmail.com> - 2013-06-13 11:35 -0400
    Re: Wrong website loaded when other requested Νικόλαος Κούρας <support@superhost.gr> - 2013-06-13 19:52 +0300
      Re: Wrong website loaded when other requested Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-13 11:04 -0700
        Re: Wrong website loaded when other requested Nick the Gr33k <support@superhost.gr> - 2013-06-14 18:37 +0300
          Re: Wrong website loaded when other requested rusi <rustompmody@gmail.com> - 2013-06-14 08:45 -0700
          Re: Wrong website loaded when other requested Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-14 16:15 +0000
            Re: Wrong website loaded when other requested Nick the Gr33k <support@superhost.gr> - 2013-06-14 19:22 +0300
              Re: Wrong website loaded when other requested Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-14 17:46 +0100
              Re: Wrong website loaded when other requested Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-14 19:45 +0100
                Re: Wrong website loaded when other requested Nick the Gr33k <support@superhost.gr> - 2013-06-15 09:48 +0300

csiph-web