aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2023-08-28 23:25:46 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2023-08-28 23:29:37 +0000
commit3f2dba6ca2947b25c5bfd5f529a4bd60a38114e3 (patch)
tree56fccd4c8f677f3f5ed26282395b46ec7b8a5a16
parent2d9541f1ae4ff1629f13be86b8c9d49824b04d20 (diff)
downloadports-3f2dba6ca2947b25c5bfd5f529a4bd60a38114e3.tar.gz
ports-3f2dba6ca2947b25c5bfd5f529a4bd60a38114e3.zip
devel/RStudio: Fix crash caused by the std::bad_cast exception in RStudio-server
This caused users to be unable to log in. The workround is now in place. (cherry picked from commit 78d590c1287a4c5cdc5e51404e0702bbb6e7d2c6)
-rw-r--r--devel/RStudio/Makefile2
-rw-r--r--devel/RStudio/files/patch-src_cpp_server_auth_ServerAuthHandler.cpp26
2 files changed, 27 insertions, 1 deletions
diff --git a/devel/RStudio/Makefile b/devel/RStudio/Makefile
index 218a96db00d2..dcc39863ecb0 100644
--- a/devel/RStudio/Makefile
+++ b/devel/RStudio/Makefile
@@ -4,7 +4,7 @@
PORTNAME= RStudio
DISTVERSIONPREFIX= v
DISTVERSION= 2022.12.0+353
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= devel math java
MASTER_SITES= https://s3.amazonaws.com/rstudio-buildtools/dictionaries/:dictionaries \
https://s3.amazonaws.com/rstudio-buildtools/:buildtools
diff --git a/devel/RStudio/files/patch-src_cpp_server_auth_ServerAuthHandler.cpp b/devel/RStudio/files/patch-src_cpp_server_auth_ServerAuthHandler.cpp
new file mode 100644
index 000000000000..50698fa7bb48
--- /dev/null
+++ b/devel/RStudio/files/patch-src_cpp_server_auth_ServerAuthHandler.cpp
@@ -0,0 +1,26 @@
+- workaround for the std:bad_cast exception in the licensed user info retrievel code
+- that isn't even used on FreeBSD
+- see https://github.com/rstudio/rstudio/issues/12377
+- resolution: the offending function's body is commented out for the time being
+
+--- src/cpp/server/auth/ServerAuthHandler.cpp.orig 2023-08-28 18:24:18 UTC
++++ src/cpp/server/auth/ServerAuthHandler.cpp
+@@ -383,6 +383,7 @@ Error getUserFromDatabase(const boost::shared_ptr<ICon
+ boost::posix_time::ptime* pLastSignin,
+ bool* pExists)
+ {
++#if 0
+ LOG_DEBUG_MESSAGE("Getting user from database: " + user.getUsername());
+
+ *pLocked = true;
+@@ -439,6 +440,10 @@ Error getUserFromDatabase(const boost::shared_ptr<ICon
+ }
+
+ *pExists = foundUser;
++#endif
++
++ *pExists = false;
++
+ return Success();
+ }
+