Fehler in plugin_event_trackexits

Hier können Probleme und alles andere in Deutscher Sprache gelöst werden.
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Kannst Du das näher erklären? Inwiefern kann man da was einschleusen? :?:
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Wenn Du als Link folgendes eingibst:

Code: Select all

http://garv.in" onlick="alert(document.cookie)
Grüße,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Aha, danke.

Dann sollten wir mal einen Blick zur Konkurrenz werfen: Wordpress geht damit offenbar spielend um:

Ich habe es mal auf einer Testseite probiert:

Code: Select all

http://example.com” onlick=”alert(document.cookie)

http://www.example/test.html?bla=4&blub=test,komma;semikolon:doppelpunkt

http://www.müller.example
ergibt dort http://demo.opensourcecms.com/wordpress/?p=3#comments

(Du mußt aber schnell gucken, in 30 min gibt es dort wieder den großen Reset - ansonsten halt einfach nochmal den Code oben als Kommentar eingeben und dann nicht vergessen, im Admin-Bereich freischalten)

In den Link wird das onclick nicht aufgenommen - und in aktuelleren Versionen als das Demo dort, wird sogar das müller sauber umgesetzt, teilweise sogar als http://www.xn--mller-kva.example/


Hier noch ein Demo mit aktuellerer Wordpress-Installation:

http://takethisdemo.com/?p=46#comment-17

Merkwürdig: Zwar wird jetzt müller sauber erkannt, dafür ist jetzt beim XSS-Versuch das " mit reingerutscht und macht damit den Link kaputt (was ja egal ist, wer sowas versucht, der hat es nicht anders verdient :-))
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Ich habe entdeckt, dass das "Regexp Markup" plugin bereits ein 'ClickableURLs' hat. Probier das mal?


Grüße,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Funktioniert! :-)

Aaaber: Es hagelt Fehler!

Nach dem Speichern erscheint

Code: Select all

Warning: constant() [function.constant]: Couldn't find constant last_ts in /home/xxx/htdocs/plugins/serendipity_event_regexpmarkup/serendipity_event_regexpmarkup.php on line 76

Warning: constant() [function.constant]: Couldn't find constant last_ts in /home/xxx/htdocs/plugins/serendipity_event_regexpmarkup/serendipity_event_regexpmarkup.php on line 77

und an allen möglichen und unmöglichen Stellen (im Seitenbereich, unten auf der Seite ...) Stellen mehrfach:

Code: Select all

Warning: preg_replace() [function.preg-replace]: Unknown modifier '>' in /home/xxx/htdocs/plugins/serendipity_event_regexpmarkup/serendipity_event_regexpmarkup.php on line 150

Ich habe das Plugin sowohl am Anfang als auch am Ende der Plugin-Liste probiert.
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

erster fehler committed, beim ">" modifier bin ich etwas ideelos.

Editier mal die ClickableURL.php und ersetze im SearchArray das "..." durch '...' mit single quotes; evtl. wurde der "/" vorher nicht korrekt escaped; in 'single quotes' müsste es anders aussehen.

Grüße,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Ich finde da kein ... ?

Code: Select all

$regexpArray = array(
    'SearchArray'=>array(
		"/([^]_a-z0-9-=\"'\/])((https?|ftp|gopher|news|telnet):\/\/|www\.)([^ \r\n\(\)\^\$!`\"'\|\[\]\{\}<>]*)/si",
		"/^((https?|ftp|gopher|news|telnet):\/\/|www\.)([^ \r\n\(\)\^\$!`\"'\|\[\]\{\}<>]*)/si"
    ),
    'ReplaceArray'=>array(
		'\\1<a href="\\2\\4" target="_blank">\\2\\4</a>',
		'<a href="\\1\\3" target="_blank">\\1\\3</a>'
    )
);
?>
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Code: Select all

$regexpArray = array(
    'SearchArray'=>array(
		'/([^]_a-z0-9-=\"'\/])((https?|ftp|gopher|news|telnet):\/\/|www\.)([^ \r\n\(\)\^\$!`\"'\|\[\]\{\}<>]*)/si',
		'/^((https?|ftp|gopher|news|telnet):\/\/|www\.)([^ \r\n\(\)\^\$!`\"'\|\[\]\{\}<>]*)/si'
    ),
    'ReplaceArray'=>array(
		'\\1<a href="\\2\\4" target="_blank">\\2\\4</a>',
		'<a href="\\1\\3" target="_blank">\\1\\3</a>'
    )
);
?>
Probier's mal damit.

Grüße,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Daran lag es nicht, der Fehler verschwindet, wenn ich FlashVideoPlayer.php lösche, da muß der Fehler sein:

Code: Select all

$regexpArray = array(
    'SearchArray'=>array(
		"/<flv:([^>]+)/>/U"
    ),
    'ReplaceArray'=>array(
		'object type="application/x-shockwave-flash" width="320" height="240" data="http://yourdomain/flv.swf?file=%s"><param name="movie" value="http://yourdomain/flv.swf?file=%s" /></object>'
    )
);
Wobei ich zugeben muß, ich verstehe nicht wirklich, was da wie umgewandelt werden soll.
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi1

Super, danke. Gefixt. Da muss /> durch \/> ersetzt werden.

Grüße,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Und um nochmal zum Thema " clickable urls" zurückzukommen:

Dieser regex-Code macht aus einem

http://example.com” onlick=”alert(document.cookie)

ein <a href="http://example.com”"> während das Blog auf http://demo.opensourcecms.com/wordpress/ das " wegläßt. Komisch.

Und nochwas: Bei einigen Wordpress-Installationen wird das führende http:// im Text weggelassen, was optisch ja ganz schön aussieht.


Und nochwas:

aus http://müller.example macht Dein regex:

<a href="http://www.müller.example" target="_blank"><a href="http://www.müller.example" target="_blank">http://www.müller.example</a></a>
Ciao, Stephan
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

stm999999999 wrote:<a href="http://www.müller.example" target="_blank"><a href="http://www.müller.example" target="_blank">http://www.müller.example</a></a>
Das muß irgendwas damit zu tun haben, daß hier zweimal fast diesselben regex-Zeilen stehen:

Code: Select all

    'SearchArray'=>array(
		"/([^]_a-z0-9-="'\/])((https?|ftp|gopher|news|telnet):\/\/|www\.)([^ \r\n\(\)\^\$!`"'\|\[\]\{\}<>]*)/si",
	    	               "/^((https?|ftp|gopher|news|telnet):\/\/|www\.)([^ \r\n\(\)\^\$!`"'\|\[\]\{\}<>]*)/si"
Was genau macht

Code: Select all

([^]_a-z0-9-="'\/])
?


Undn nochwas:

Dein Code setzt auch www.example.com um, aber er ergänzt im href nicht http://, so daß daraus wird http://mein-blog.example/www.example.com
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Evtl. mal RobA anschreiben oder im englischen Forum posten, bitte. Ist nicht mein Plugin. :)

Grüße,
GArvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply