Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XSS in player.js #4

Open
mmiszczyk opened this issue Jul 12, 2018 · 2 comments
Open

XSS in player.js #4

mmiszczyk opened this issue Jul 12, 2018 · 2 comments

Comments

@mmiszczyk
Copy link

            tmp.onloadeddata = function () {
                playList.push({
                    index: gi,
                    song: file,
                    song_name: file,
                    duration: tmp.duration
                })
                song_list.append(`<li class="list">
            <span class="index">${playList[gi].index + 1}</span>
            <span class="song">${playList[gi].song_name}</span>
            <span class="duration">${toTime(playList[gi].duration)}</span>
            </li>`);
                    playList.push({
                        index: gi,
                        song: file,
                        song_name: metadata.title || file,
                        duration: metadata.duration
                    });
                    song_list.append(`<li class="list">
                    <span class="index">${playList[gi].index + 1}</span>
                    <span class="song">${playList[gi].song_name}</span>
                    <span class="duration">${toTime(playList[gi].duration)}</span>
                    </li>`);

This is not secure, as you can just insert your own HTML/js into filename or metadata and have it execute inside the application: e.g. edit any MP3 file and set title to <script>alert('xss')</script>, and the alert box will pop up when you select a folder containing the song.

@MD-AZMAL
Copy link
Owner

ya i will start working on it... i was kind of busy with other project.... couldn't respond..

@MD-AZMAL
Copy link
Owner

thanks for your feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants