Why do errors occur?
Simply source

    class page:
    pages = "/.././ewcwe/../qds/./qwd/qwf/qwd/../../../sad/qwd/../sad/qwd/sad/.././../../../../bbs/./board.php?bo_table=humor&wr_id=195?los=09&qwe=2&"

    def __init__(self):
        self.normalize()
    
    def normalize(self):
        for j in range(1, len(self.pages)):
            if self.pages[j-1] != "." and self.pages[j] == "." and self.pages[j+1] == "/":
                self.pages = self.pages[:j] + self.pages[j+2:]
                print self.pages
        
        print self.pages

index = page()


There's no problem but error occurs.
Why do errors occur? ㅠㅠ
Why do errors occur?
===

Simply source

    class page:
    pages = "/.././ewcwe/../qds/./qwd/qwf/qwd/../../../sad/qwd/../sad/qwd/sad/.././../../../../bbs/./board.php?bo_table=humor&wr_id=195?los=09&qwe=2&"

    def __init__(self):
        self.normalize()
    
    def normalize(self):
        for j in range(1, len(self.pages)):
            if self.pages[j-1] != "." and self.pages[j] == "." and self.pages[j+1] == "/":
                self.pages = self.pages[:j] + self.pages[j+2:]
                print self.pages
        
        print self.pages

index = page()


There's no problem but error occurs.
Why do errors occur? ㅠㅠ