I encrypted a file.
gpg -c demoFile.txt
But without any flags I am able to decrypt a file without password.
gpg demoFile.txt.gpg
I encrypted a file.
gpg -c demoFile.txt
But without any flags I am able to decrypt a file without password.
gpg demoFile.txt.gpg
It is a feature not a bug. For symmetric encryption the gpg-agent remembers the passphrase used for the encryption and thus for some time or until /gpgconf --reload gpg-agent/ it tries that passphrase for decryption.