Untitled attachment
https://taruntarun.net/media_files/Mastodon/media_attachments/files/000/252/269/original/4e04c5c95a62f248.png
notestockにXSSが有ったので修正しました。phpのstrip_tagsを使っているのにすり抜けていて、なんでだろって思って調べてみました。ActivityPubで届くデータはHTMLなんですがscriptタグは< >でエンティティ化されています。このときstrip_tagsはタグじゃないのでこれを無視します。そのあと、ハッシュタグリンクをnotestock向け検索アドレスに書き換える処理があり、そこでDOMDocumentを使っていて、こいつがエンティティ化された記号を< >記号に戻します。それをそのまま出力・・・こんにちは!!という流れでした。この問題は2018年9月13日から発生していました。報告していただいたくりむさん @klim0824 、ありがとうございます。
senooken JP Social is a social network, courtesy of senooken. It runs on GNU social, version 2.0.2-beta0, available under the GNU Affero General Public License.
All senooken JP Social content and data are available under the Creative Commons Attribution 3.0 license.