New topic: Decryption broke in 2012r2 and 2012r2.1
<http://forums.realsoftware.com/viewtopic.php?t=47736> Page 1 of 1 [ 7 posts ] Previous topic | Next topic Author Message jjfcpa Post subject: Decryption broke in 2012r2 and 2012r2.1Posted: Mon Apr 29, 2013 2:32 pm Joined: Tue Apr 17, 2007 9:19 pm Posts: 430 We just realized that RB2012r2 and RB2012r2.1 do NOT decrypt a Realsqldatabase. New bug I'm guessing and it shouldn't take long to validate. I attempted to post this through the Feedback system, but when I tried to run the Feedback in RB2012r2.1, it said it needed to download an update and couldn't find it. Is this because the RB website was hacked? Next, I tried to go to the RS website to access the Feedback system and it would not accept my login credentials. All in all, looks bad for RS if you can't report something like this ASAP because our applications suddenly can't decrypt their own data files. YIKES! BTW, we confirmed that RB2012r1 and RB2012r1.1 both worked and will decrypt the database. So how do we get a fix? Top npalardy Post subject: Re: Decryption broke in 2012r2 and 2012r2.1Posted: Mon Apr 29, 2013 5:38 pm Real Software Engineer Joined: Sat Dec 24, 2005 8:18 pm Posts: 7793 Location: Canada, Alberta, Near Red Deer jjfcpa wrote:We just realized that RB2012r2 and RB2012r2.1 do NOT decrypt a Realsqldatabase. New bug I'm guessing and it shouldn't take long to validate. I attempted to post this through the Feedback system, but when I tried to run the Feedback in RB2012r2.1, it said it needed to download an update and couldn't find it. Is this because the RB website was hacked? Next, I tried to go to the RS website to access the Feedback system and it would not accept my login credentials. All in all, looks bad for RS if you can't report something like this ASAP because our applications suddenly can't decrypt their own data files. YIKES! BTW, we confirmed that RB2012r1 and RB2012r1.1 both worked and will decrypt the database. So how do we get a fix? I've not encountered any issues with encryption in the REALSQLDatabase in any edition - much less 2012r2 or 2.1 _________________ Norman Palardy (Real Software) Top J.Sh3ppard Post subject: Re: Decryption broke in 2012r2 and 2012r2.1Posted: Mon Apr 29, 2013 5:48 pm Joined: Tue Mar 23, 2010 8:44 pm Posts: 616 I am not sure but something like this sounds familiar to me as. I have an older project which uses the encryption / decryption and sometimes the data is correctly shown in plain text after the decryption and sometimes it's not. I post the data to a php script where I view it online. I became aware of the issue when apparently no reason (no code changes) it flip flops between clear text and encrypted text... I can't say for sure what's going on because this is an older project and I haven't tackled that problem yet but this issue does sound a bit familiar to me although it could be my bug. If I remember accurately I was having this issue using RS 2010 5.1. I don't know if it will be the same in 2012 x.x. Top jjfcpa Post subject: Re: Decryption broke in 2012r2 and 2012r2.1Posted: Tue Apr 30, 2013 7:48 am Joined: Tue Apr 17, 2007 9:19 pm Posts: 430 No, this is a case where we have an application that is still running compiled with 2012r1.1 and the Realsqldatabase is encrypted. We attempted to run the project with 2012r2.1 and we get an error that the database can't be opened. As it turns out, the error is occurring because the db will not decrypt with the provided password. We ran the project with 2012r1.1 and everything works fine. We further confirmed that using Sqlite Manager we can open the db with the correct password. We verified this with another of our applications that also uses encryption - can be turned on or off. Same results. I'm going to try and put together a sample file to send to RS so they can diagnose. Top jjfcpa Post subject: Re: Decryption broke in 2012r2 and 2012r2.1 [ SOLVED ]Posted: Tue Apr 30, 2013 10:34 am Joined: Tue Apr 17, 2007 9:19 pm Posts: 430 Ok, here is what we found. If you attempted to open an encrypted realsqldatabase in a version of RB prior to 2012r2, then you would get an error 26 ( File is encrypted or is not a database ); however, if you try to open it with 2012r2 or later, you get an error 21 ( Library routine called out of sequence). So our problem was that the error we were checking for to know the file was encrypted was failing and our application would not attempt to pass the password to it because it didn't recognize the error code. If we modify our applications to check for error 26 or error 21, then it works, but should it??? Top npalardy Post subject: Re: Decryption broke in 2012r2 and 2012r2.1 [ SOLVED ]Posted: Tue Apr 30, 2013 11:10 am Real Software Engineer Joined: Sat Dec 24, 2005 8:18 pm Posts: 7793 Location: Canada, Alberta, Near Red Deer jjfcpa wrote:Ok, here is what we found. If you attempted to open an encrypted realsqldatabase in a version of RB prior to 2012r2, then you would get an error 26 ( File is encrypted or is not a database ); however, if you try to open it with 2012r2 or later, you get an error 21 ( Library routine called out of sequence). So our problem was that the error we were checking for to know the file was encrypted was failing and our application would not attempt to pass the password to it because it didn't recognize the error code. If we modify our applications to check for error 26 or error 21, then it works, but should it??? Usually when I do this I dont try & target a specific error code. I try without the password and if that fails try the encrypted. The db engine (sqlite) source code may change, we don't control that, and it may be the source of the changed error code. There are / were only 4 bug reports fixed in the engine between version 2012r1.2 and 2002r2 - none of which changed error codes that I can see. _________________ Norman Palardy (Real Software) Top jjfcpa Post subject: Re: Decryption broke in 2012r2 and 2012r2.1 [ SOLVED ]Posted: Tue Apr 30, 2013 12:12 pm Joined: Tue Apr 17, 2007 9:19 pm Posts: 430 npalardy wrote:jjfcpa wrote:Ok, here is what we found. If you attempted to open an encrypted realsqldatabase in a version of RB prior to 2012r2, then you would get an error 26 ( File is encrypted or is not a database ); however, if you try to open it with 2012r2 or later, you get an error 21 ( Library routine called out of sequence). So our problem was that the error we were checking for to know the file was encrypted was failing and our application would not attempt to pass the password to it because it didn't recognize the error code. If we modify our applications to check for error 26 or error 21, then it works, but should it??? Usually when I do this I dont try & target a specific error code. I try without the password and if that fails try the encrypted. The db engine (sqlite) source code may change, we don't control that, and it may be the source of the changed error code. There are / were only 4 bug reports fixed in the engine between version 2012r1.2 and 2002r2 - none of which changed error codes that I can see. The problem may be the Realbasic documentation then, because if you look at the sqlite error codes here http://www.sqlite.org/c3ref/c_abort.html you note that error code 26 does not say anything about the file being encrypted; however, if you look in the LR, it states "File is encrypted or not a database". In the past, we just tried to connect without a password and if the error code was 26 we knew the file was encrypted. Obviously, that won't work anymore so we'll have to do as you suggested. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 7 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
