]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- protect against whitespace after href= or frame src=,
authorJakub Bogusz <qboosh@pld-linux.org>
Thu, 12 Dec 2002 10:31:50 +0000 (10:31 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  and maybe some other, unknown yet, hangups

Changed files:
    pldnotify.awk -> 1.27

pldnotify.awk

index 6013dac1e5132fb75b375e47eff58d957535b6ba..2b9d31a8ba58beabe674e39a4f25e2960c02a639 100644 (file)
@@ -76,7 +76,7 @@ function get_links(url,       errno,link,oneline,retval,odp,tmpfile) {
                        odp=(odp " " oneline)
                if ( DEBUG ) print "Odpowiedz: " odp
        }
-               
+       
        close(tmpfile)
        system("rm -f " tmpfile)
        if ( errno==0) {
@@ -85,22 +85,28 @@ function get_links(url,     errno,link,oneline,retval,odp,tmpfile) {
                                match(tolower(odp),/<frame[ \t][^>]*>/)
                                ramka=substr(odp,RSTART,RLENGTH)
                                odp=substr(odp,RSTART+RLENGTH)
+                               sub(/[sS][rR][cC]=[ \t]+/,"src=",ramka);
                                match(tolower(ramka),/src="[^"]+"/)
                                newurl=substr(ramka,RSTART+5,RLENGTH-6)
                                if (DEBUG) print "Ramka: " newurl
                                retval=(retval " " get_links(newurl))
-                       } else if (tolower(odp) ~ /href="[^"]+"/) {
+                       } else if (tolower(odp) ~ /href=[ \t]*"[^"]+"/) {
+                               sub(/[hH][rR][eE][fF]=[ \t]+/,"href=",odp)
                                match(tolower(odp),/href="[^"]+"/)
                                link=substr(odp,RSTART,RLENGTH)
                                odp=substr(odp,RSTART+RLENGTH)
                                link=substr(link,7,length(link)-7)
                                retval=(retval " " link)
-                       } else {
+                       } else if (tolower(odp) ~ /href=[ \t]*[^ \t>]+/) {
+                               sub(/[hH][rR][eE][fF]=[ \t]+/,"href=",odp)
                                match(tolower(odp),/href=[^ \t>]+/)
                                link=substr(odp,RSTART,RLENGTH)
                                odp=substr(odp,RSTART+RLENGTH)
                                link=substr(link,6,length(link)-5)
                                retval=(retval " " link)
+                       } else {
+                               retval=(retval " INTERNAL_ERROR")
+                               break
                        }
                }
        } else {
This page took 0.041081 seconds and 4 git commands to generate.