michelonsouza / encrypt-storage

EncryptStorage provide a little more security in frontend
MIT License
266 stars 13 forks source link

Invalid left-hand side in assignment (Angular) #640

Closed kisimediaDE closed 11 months ago

kisimediaDE commented 1 year ago

Hey 😃

the bug from #583 is still in the current version of the plugin. People (including me) are very confused about it. Because in your comment you wrote that you promise a fix in the next version but the added tag is saying WON'T FIX.

Since the issue is closed and still people are commenting it I open this issue to continue the talk.

Hope you have a good week and greetings!

lbetancourtoliva commented 1 year ago

I get the same issue with the latest version @michelonsouza. Greetings.

michelonsouza commented 1 year ago

I'm sorry about that guys.... I promise I'll fix it ASAP

ravi-mone commented 1 year ago

@michelonsouza , Can you please fix this , after a long long debugging process I got to know this error is from this encryption package, Can you please fix ASAP, please

I fell here is the issue src/async-encrypt-storage.ts

if (window && window?.globalThis) {
  /* istanbul ignore next */
  (window?.globalThis as any).AsyncEncryptStorage = AsyncEncryptStorage;
}

TO

if (window && window?.globalThis) {
  /* istanbul ignore next */
//HERE window?.globalThis is changed to window.globalThis
  (window.globalThis as any).AsyncEncryptStorage = AsyncEncryptStorage; 
}

Can you please update the code and publish the new version

ravi-mone commented 1 year ago

@kisimediaDE , it is like this window.a = 1; //This will not throw error window?.a = 1; //But this will throw error Uncaught SyntaxError: Invalid left-hand side in assignment

kisimediaDE commented 1 year ago

@ravi-mone thanks 😄 as described here #583 I know exactly what causes the error and also since which commit. You can just use a old version and everything is working.

ravi-mone commented 1 year ago

@kisimediaDE thanks for that, it was quick. thanks a ton question : then what we are missing if we use this older version 2.12.8, becasue he is already at 2.12.16

kisimediaDE commented 1 year ago

@ravi-mone dependencies updates. Nothing relevant from function perspective.

michelonsouza commented 11 months ago

I would like to apologize for my absence. It's been a busy few weeks, but now I'm back. I fixed the issue and hope to have good news from testing in version v2.12.19.

Thank you all and again, I'm sorry.

kisimediaDE commented 11 months ago

Hey, no problem, we're all more than happy that you're even doing the work to develop such a great product in your spare time. And even without the update, the plugin worked in an old version.

I just updated and deployed my project. I no longer get an error message and your latest update works perfectly.

Thank you so much and have a great day!!! 😄

yellowjacketcoder commented 9 months ago

@michelonsouza This issue still exists in latest version 2.12.22

@kisimediaDE How did you get this to work with Angular 15?