Say we can influence our dreams to a certain extend and are able to participate involuntarily in somebody else dream, I am wondering is there a way to prevent leaking important information such as my Bank account number etc to other? Imagine a certain gifted individual who mastered the art of dream phishing which could potentially cause havoc in the real world... Take note that the only scientific miracle has been used to wire everybody dreams together, a good answer should touch on our brain own built-in firewall or something that isn't too far fetched.
If the technology is universal and memory sharing gets common, the solution is transparency.
Instead of everyone keeping their own secrets to guard against unauthorized transactions, the sequence of events is kept largely public. You don't prove who you are by presenting proof of knowledge, since knowledge is no longer a proof by itself, but through others' knowledge of you. This is a simpler version of the principle used in cryptocurrency blockchains, except you'd be linking it to real people and not semi-anonymous wallets.
This means a world with much less privacy than ours. But since you have shared dreams, privacy is already essentially destroyed in your world.
If you're just a private citizen trying to keep yourself secure in a lighter scenario with occasional dream-sharing, the solution is way more boring - physical tokens. Dreams cannot be used to phish out something you don't know - such as a 4096-bit key, randomly generated from thermal noise, and stored inside a thumb drive sized cryptoprocessor.
This is the solution used in real life for strong authentication. Its protection from physical token theft is requiring a PIN to the token itself, which is no longer secure in your world. But that's still two defenses your attacker has to defeat instead of just one. And in a world like this tokens would most likely be protected by fingerprints, not passwords.
High level a dream looks real, but low level it's far from being realistic.
One of the trigger for lucid dreaming is indeed checking some low level things like looking at oneself in a mirror or switching on/off a light. In other words, low level details in dreams are inaccurate.
I would therefore say that our brain has already a layer of security, which obscures detailed information such account numbers, PINs, passwords, making them unusable.
In a world where everyone knows others can access your dreams, it wouldn't be far fetched to not use secure information, until you've checked if your dreaming or not. Add a small device that gives a small electric jolt next to ATM's and computers, so before you enter passwords you always get a small shock to verify your awake. If someone tries to get your password in a dream, by making your think your at work, you'll figure out something is wrong when you don't get shocked.
Other solution could be two-factor login. Currently if I buy something online with my creditcard I get a text with a number I then have to give to the site to verify this is actually my creditcard. even if others were to get my information, they can't use it for anything unless they also get access to my phone. (so doesn't matter they got my creditcard info in my dreams, it can't be used on it's own)
Take into consideration that if more people had this ability there would be more empathy between people, as ones wellbeing affects the others. This wouldn't result in some hive-mind but simply put, it would change the way people perceive each other. Poverty for example would be taken care of because if people are having nightmares it will affect others as well. There would be no need for passwords because such a link would promote trust and empathy.