mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #1103] Javascript warnings when autocomplete (password saving) is enabled and cypht is running under https #571
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#571
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @seatimx on GitHub (Jun 27, 2024).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1103
Originally assigned to: @christer77 on GitHub.
🐛 Bugreport
When password is saved (at least using Chrome) and cypht runs under https, there's a hidden text field that gets autofilled, therefore whenever you click on any link a javascript alert pops up warning about unsaved changes that will be lost.
Version & Environment
Version 2.1.0
Steps to reproduce
@christer77 commented on GitHub (Jun 28, 2024):
Well received, we are investing in it
@seatimx commented on GitHub (Jun 29, 2024):
Just a comment, I've been able to solve this kind of issues with other systems (I would fix it in Cypht but I'm not familiar with the framework you're using) by passing the data from the hidden text field as content of a hidden div. Then I have javascript/jquery read the content of such hidden div so it can be posted...
@marclaporte commented on GitHub (Jun 29, 2024):
We are not using an external framework on the back-end. Just standard PHP. And we we leverage a small number of libs via Packagist.org
For the front-end, there is a lot of Cypht-specific JavaScript. And we recently incorporated Bootstrap 5 but there is still some work to do, to fully leverage it.
@seatimx commented on GitHub (Jun 29, 2024):
I guess I fould a solution, but would like you to confirm...
To me, it seems like the problem lies in the line:
<input type="text" value="'.$this->html_safe($this->get('username', 'cypht_user')).'" autocomplete="username" style="display: none;"/>Which can be found twice in modules/core/output_modules.php
Now, I've searched other files, and it seems like the username is retrieved from the session, not from the HTTP POST, so this line can be commented safely.
So far, I've commented both lines and tried saving settings a couple times, settings were saved and everything seems to be working fine.
However I don't know if removing that input line may cause other parts of Cypht to break.
@christer77 commented on GitHub (Jun 29, 2024):
Can you tell us what environment you were able to carry out this test on? On my side, I was able to test on a linux server with SSL and everything is good, in any case I don't get this warning when I click on any link.
@marclaporte commented on GitHub (Jun 29, 2024):
@seatimx Once @christer77 sees the issue, he will fix it.
Maybe you can come to https://gitter.im/cypht-org/community and coordinate with @christer77 for a screenshare session?
@seatimx commented on GitHub (Jun 30, 2024):
I've joined gitter.im using the same nickname as I do here @ github.
@christer77 commented on GitHub (Jul 1, 2024):
https://matrix.to/#/!SeNiIGzqZwRjAclUCr:gitter.im/$LJp7WS7JU3aLxJg01c76I0_Ccb6yidTf2aTXpzaMpZ8?via=gitter.im&via=matrix.org&via=coeus.ca
@marclaporte commented on GitHub (Aug 20, 2024):
@seatimx @christer77 What is the latest?
@seatimx commented on GitHub (Aug 20, 2024):
Didn't hear from @christer77 after we did the screen share session...
@marclaporte commented on GitHub (Oct 8, 2024):
@christer77 Please share summary of the conversation.
@christer77 commented on GitHub (Oct 9, 2024):
We had finished the screen sharing session with @seatimx . Right after, I already tried to reproduce this, but it was unsuccessful. If you don't mind, I can share with you an inbox subdomain, so we can redo the screen sharing while following your procedure to see how it will happen again.
What do you think?
@seatimx commented on GitHub (Oct 15, 2024):
If you want me to help, I'm more than willing.
@christer77 commented on GitHub (Oct 21, 2024):
https://matrix.to/#/!SeNiIGzqZwRjAclUCr:gitter.im/$RFa3bpuTWbm4fosnqjwpi65pXe4pVZ1rmCf7RO-rqFk?via=gitter.im&via=matrix.org&via=osba.nl
@christer77 commented on GitHub (Jun 24, 2025):
Since the issue appears to be browser-related, we’re closing this for now, but @seatimx can reopen it if the problem persists after further testing.