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

BePDF prompts for password for unencrypted file if file cannot be opened #118

Open
grexe opened this issue Aug 27, 2024 · 2 comments
Open

Comments

@grexe
Copy link
Contributor

grexe commented Aug 27, 2024

for some reason, the check in BepdfApplication.cpp does not work correctly, causing BePDF to always ask for a password even for unencrypted files if there was any error opening the file, e.g. if the file was not found.

Maybe also causes #105 ?

@grexe grexe changed the title BePDF prompts for password if file cannot be opened BePDF prompts for password for unencrypted file if file cannot be opened Aug 27, 2024
@grexe
Copy link
Contributor Author

grexe commented Aug 27, 2024

and the culprit is an old bugfix that always sets encrypted to true:
PDFView.cpp:248.

This does not affect further processing if the document was opened OK, but results in a wrong flow when it is not.
Since we are now on XPDF4, we can safely remove this hack.

@grexe
Copy link
Contributor Author

grexe commented Aug 27, 2024

fixed, along with a segment violation when BePDF was launched with a non-existing file:

Haiku revision: hrev58021 Aug 27 2024 06:02:18 (x86_64)

Active Threads:
	thread 3310: stdout 
	thread 3311: stderr 
	thread 3314: w>BePDF status 
	thread 3315: team 3307 debug task 
	thread 3318: w>Error messages 
	thread 3307: BePDF (main)
		state: Exception (Segment violation)

		Frame		IP			Function Name
		-----------------------------------------------
		0x7f75148f6090	0x14f5d7ead07	PDFView::OpenFile(entry_ref*, char const*, char const*, bool*) + 0x105 
			Disassembly:
				PDFView::OpenFile(entry_ref*, char const*, char const*, bool*):

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

No branches or pull requests

1 participant