Skip to content

Commit

Permalink
renames test file so it doesn't conflict locally and adds confirmatio…
Browse files Browse the repository at this point in the history
…n dialog prior to redirect
  • Loading branch information
jacklynhma committed Dec 3, 2024
1 parent ed32d8d commit 50441e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/views/dashboards/_subject.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
link_to(
truncate(user.homepage_url, length: 20),
user.homepage_url,
rel: "nofollow"
rel: "nofollow",
data: { confirm: "Are you sure?" }
)
%></p>
</div>
Expand Down
3 changes: 2 additions & 1 deletion app/views/profiles/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@
truncate(@user.homepage_url,length: 20),
@user.homepage_url,

Check warning

Code scanning / CodeQL

Stored cross-site scripting Medium

Stored cross-site scripting vulnerability due to
stored value
.
rel: "nofollow",
class: "profile__header__attribute t-link--black"
class: "profile__header__attribute t-link--black",
data: { confirm: "Are you sure?" }
)
%>
</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "application_system_test_case"
require "test_helper"

class ProfileTest < ApplicationSystemTestCase
class AuthorizingProfileUpdate < ApplicationSystemTestCase
setup do
@user = create(:user, email: "[email protected]", password: PasswordHelpers::SECURE_TEST_PASSWORD, handle: "nick1", mail_fails: 1)
end
Expand Down

0 comments on commit 50441e6

Please sign in to comment.