I'm creating an custom authenticator to my Alfresco JLan.
Here's my jlanConfig.xml:
<?xml version="1.0" standalone="no"?>
<!-- <!DOCTYPE jlanserver SYSTEM "jlanserver.dtd"> -->
<jlanserver>
<servers>
<SMB/>
<noFTP/>
<noNFS/>
</servers>
<SMB>
<host name="NUAGESERVER" domain="NUAGE">
<broadcast>255.255.255.0</broadcast>
<smbdialects>LanMan,NT</smbdialects>
<comment>Alfresco JLAN Server</comment>
<Win32NetBIOS/>
<Win32Announce interval="5"/>
<!-- To run the server using a non-root account on linux, Mac OS X, Solaris -->
<netBIOSSMB sessionPort="1139" namePort="1137" datagramPort="1138" platforms="linux,macosx,solaris"/>
<tcpipSMB port="1445" platforms="linux,macosx,solaris"/>
<hostAnnounce interval="5"/>
</host>
<sessionDebug flags="Negotiate,Socket,Tree"/>
<netbiosDebug/>
<announceDebug/>
<authenticator>
<class>com.ye.nuage.auth.NuageAuthenticator</class>
<Debug/>
</authenticator>
</SMB>
<FTP>
<port>21</port>
<allowAnonymous/>
<debug flags="File,Search,Error,DataPort,Directory"/>
</FTP>
<NFS>
<enablePortMapper/>
<debug flags="File,FileIO"/>
</NFS>
<debug>
<output>
<class>org.alfresco.jlan.debug.ConsoleDebug</class>
<logFile>jlansrv.log</logFile>
<append/>
</output>
</debug>
<shares>
<diskshare name="JLAN" comment="Test share">
<driver>
<class>org.alfresco.jlan.smb.server.disk.JavaFileDiskDriver</class>
<LocalPath>.</LocalPath>
</driver>
</diskshare>
</shares>
<security>
<JCEProvider>cryptix.jce.provider.CryptixCrypto</JCEProvider>
<authenticator>
<class>com.ye.nuage.auth.NuageAuthenticator</class>
<mode>USER</mode>
</authenticator>
<users>
<user name="jlansrv">
<password>jlan</password>
<comment>System administrator</comment>
<administrator/>
</user>
<user name="normal">
<password>normal</password>
</user>
</users>
</security>
</jlanserver>
My NuageAuthenticator is a copy of CifsAuthenticator, excepts those methods:
Override
public int authenticateUser(ClientInfo client, SrvSession sess, int alg) {
// Check if the user exists in the user list
UserAccount userAcc = null;
try {
userAcc = getNuageUserDetails(client.getUserName());
} catch (YeException e) {
e.printStackTrace();
}
if (userAcc != null) {
// Validate the password
boolean authSts = false;
if (client.getPassword() != null) {
// Validate using the Unicode password
authSts = validateNuagePassword(userAcc, client, sess.getAuthenticationContext(), alg);
} else if (client.hasANSIPassword()) {
// Validate using the ANSI password with the LanMan encryption
authSts = validateNuagePassword(userAcc, client, sess.getAuthenticationContext(), LANMAN);
}
// Return the authentication status
return authSts == true ? AUTH_ALLOW : AUTH_BADPASSWORD;
}
// Check if this is an SMB/CIFS null session logon.
//
// The null session will only be allowed to connect to the IPC$ named
// pipe share.
if (client.isNullSession() && sess instanceof SMBSrvSession)
return AUTH_ALLOW;
// Unknown user
return allowGuest() ? AUTH_GUEST : AUTH_DISALLOW;
}
private UserAccount getNuageUserDetails(String userName) throws YeException {
if (context == null) {
context = new ClassPathXmlApplicationContext("/applicationContext-nuage.xml");
}
userRepository = context.getBean(UserRepository.class);
User u = userRepository.findByUserLogin(userName); // Search the user into my repository
if (u != null) {
UserAccount ua = new UserAccount();
ua.setMD4Password(u.getUserMd4Password().getBytes());
ua.setUserName(userName);
ua.setRealName(u.getUserFirstName() + " " + u.getUserLastName());
return ua;
}
return null;
}
But when I try to login, I receive the following error when I'm calling the validatePassword method.
[T2] Closing session due to exception
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.ye.nuage.auth.NuageAuthenticator.validatePassword(NuageAuthenticator.java:123)
at com.ye.nuage.auth.NuageAuthenticator.authenticateUser(NuageAuthenticator.java:60)
at org.alfresco.jlan.server.auth.CifsAuthenticator.processSessionSetup(CifsAuthenticator.java:572)
at org.alfresco.jlan.smb.server.NTProtocolHandler.procSessionSetup(NTProtocolHandler.java:396)
at org.alfresco.jlan.smb.server.NTProtocolHandler.runProtocol(NTProtocolHandler.java:213)
at org.alfresco.jlan.smb.server.SMBSrvSession.processPacket(SMBSrvSession.java:1439)
at org.alfresco.jlan.smb.server.nio.NIOCIFSThreadRequest.runRequest(NIOCIFSThreadRequest.java:104)
at org.alfresco.jlan.server.thread.ThreadRequestPool$ThreadWorker.run(ThreadRequestPool.java:141)
at java.lang.Thread.run(Thread.java:722)
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.ye.nuage.auth.NuageAuthenticator.validatePassword(NuageAuthenticator.java:123)
at com.ye.nuage.auth.NuageAuthenticator.authenticateUser(NuageAuthenticator.java:60)
at org.alfresco.jlan.server.auth.CifsAuthenticator.processSessionSetup(CifsAuthenticator.java:572)
at org.alfresco.jlan.smb.server.NTProtocolHandler.procSessionSetup(NTProtocolHandler.java:396)
at org.alfresco.jlan.smb.server.NTProtocolHandler.runProtocol(NTProtocolHandler.java:213)
at org.alfresco.jlan.smb.server.SMBSrvSession.processPacket(SMBSrvSession.java:1439)
at org.alfresco.jlan.smb.server.nio.NIOCIFSThreadRequest.runRequest(NIOCIFSThreadRequest.java:104)
at org.alfresco.jlan.server.thread.ThreadRequestPool$ThreadWorker.run(ThreadRequestPool.java:141)
at java.lang.Thread.run(Thread.java:722)
Here's a method snip:
if (user.hasMD4Password() && alg != LANMAN) {
try {
// Generate the encrpyted password
if (alg == NTLM1) {
// Get the MD4 hashed password
byte[] p21 = new byte[21];
System.arraycopy(user.getMD4Password(), 0, p21, 0, user.getMD4Password().length); **//THE ERROR OCCURS HERE!**
// Generate an NTLMv1 encrypted password
`
The error occurs here:
System.arraycopy(user.getMD4Password(), 0, p21, 0, user.getMD4Password().length);
But the question is very simple: Why this error occurs?
The problem is with the MD4 32 bits algorithm. See more at : http://forums.alfresco.com/forum/installation-upgrades-configuration-integration/authentication-ldap-sso/alfresco-jlan-smbcifs
Related
The bug in kaa 0.10 have Influenced my application development. So I try to fix it.Then I Compared the code of the kaa 0.9 and kaa 0.10. I have found the differences in class EndpointServiceImpl of Kaa DAO interface modular:there are two methods of attachEndpointToUser in it
1,
public EndpointProfileDto attachEndpointToUser(String endpointUserId, String
endpointAccessToken) throws KaaOptimisticLockingFailureException {
LOG.info("Try to attach endpoint with access token {} to user with {}", endpointAccessToken,
endpointUserId);
validateString(endpointUserId, "Incorrect endpointUserId "
+ endpointUserId);
EndpointUser endpointUser = endpointUserDao.findById(endpointUserId);
LOG.trace("[{}] Found endpoint user with id {} ", endpointUserId, endpointUser);
if (endpointUser
!= null) {
EndpointProfile endpoint = endpointProfileDao.findByAccessToken(endpointAccessToken);
LOG.trace("[{}] Found endpoint profile by with access token {} ", endpointAccessToken,
endpoint);
if (endpoint
!= null) {
if (endpoint.getEndpointUserId()
== null
|| endpointUserId.equals(endpoint.getEndpointUserId())) {
LOG.debug("Attach endpoint profile with id {} to endpoint user with id {} ", endpoint
.getId(), endpointUser.getId());
List<String> endpointIds = endpointUser.getEndpointIds();
**/*if (endpointIds
!= null
&& endpointIds.contains(endpoint.getId())) {
LOG.warn("Endpoint is already assigned to current user {}.", endpoint
.getEndpointUserId());
return getDto(endpoint);
}*/**
if (endpointIds
== null) {
endpointIds = new ArrayList<>();
endpointUser.setEndpointIds(endpointIds);
}
endpointIds.add(endpoint.getId());
endpointUser = endpointUserDao.save(endpointUser);
while (true) {
try {
endpoint.setEndpointUserId(endpointUser.getId());
LOG.trace("Save endpoint user {} and endpoint profile {}", endpointUser, endpoint);
endpoint = endpointProfileDao.save(endpoint);
break;
} catch (KaaOptimisticLockingFailureException ex) {
LOG.warn("Optimistic lock detected in endpoint profile ", Arrays.toString(endpoint
.getEndpointKey()), ex);
endpoint = endpointProfileDao.findByKeyHash(Sha1HashUtils.hashToBytes(endpoint
.getEndpointKey()));
}
}
return getDto(endpoint);
} else {
LOG.warn("Endpoint is already assigned to different user {}. Unassign it first!.",
endpoint.getEndpointUserId());
throw new DatabaseProcessingException("Endpoint is already assigned to different user.");
}
} else {
LOG.warn("Endpoint with accessToken {} is not present in db.", endpointAccessToken);
throw new DatabaseProcessingException("No endpoint found for specified accessToken.");
}
} else {
LOG.warn("Endpoint user with id {} is not present in db.", endpointUserId);
throw new DatabaseProcessingException("Endpoint user is not present in db.");
}
}
2,
public EndpointProfileDto attachEndpointToUser(String userExternalId, String tenantId,
EndpointProfileDto profile) {
validateString(userExternalId, "Incorrect userExternalId "
+ userExternalId);
EndpointUser endpointUser = endpointUserDao.findByExternalIdAndTenantId(userExternalId,
tenantId);
if (endpointUser
== null) {
LOG.info("Creating new endpoint user with external id: [{}] in context of [{}] tenant",
userExternalId, tenantId);
EndpointUserDto endpointUserDto = new EndpointUserDto();
endpointUserDto.setTenantId(tenantId);
endpointUserDto.setExternalId(userExternalId);
endpointUserDto.setUsername(userExternalId);
endpointUser = endpointUserDao.save(endpointUserDto);
}
List<String> endpointIds = endpointUser.getEndpointIds();
if (endpointIds
== null) {
endpointIds = new ArrayList<>();
endpointUser.setEndpointIds(endpointIds);
} **/*else if (endpointIds
!= null
&& endpointIds.contains(profile.getId())) {
LOG.warn("Endpoint is already assigned to current user {}.", profile.getEndpointUserId());
return profile;
}*/**
endpointIds.add(profile.getId());
endpointUser = endpointUserDao.save(endpointUser);
profile.setEndpointUserId(endpointUser.getId());
while (true) {
try {
LOG.trace("Save endpoint user {} and endpoint profile {}", endpointUser, profile);
return saveEndpointProfile(profile);
} catch (KaaOptimisticLockingFailureException ex) {
LOG.warn("Optimistic lock detected in endpoint profile ", Arrays.toString(profile
.getEndpointKey()), ex);
profile = findEndpointProfileByKeyHash(profile.getEndpointKeyHash());
profile.setEndpointUserId(endpointUser.getId());
}
}
}
The code above is in kaa 0.10 .Compared with the Kaa 0.9, it Added a judgment condition that in Bold code above:(
if(endpointIds!=null&&endpointIds.contains(endpoint.getId())) )
and
else if (endpointIds
!= null
&& endpointIds.contains(profile.getId())).
I have made a test that Commented the judgment condition codes. The result is OK. I want to know that the fix method is available .
You can contribute to kaa.
Description on this procedure you can find here.
In few words about it:
fork kaa repository here.
crete new branch with the content of branch you want to fix(release-0.10)
commit (commit message must begin with "KAA-1594:") and push changes into your fork.
create a pull request on kaa page (compare original kaa branch release-0.10 and your new edited branch)
allow changes from owners
you are done!
UPD: would be great if you describe the problem and your solution in issue on github it will help us to make official fix faster.
i have a code that doing the following:
i got READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE in manifest
i m getting photos uri from phone you choose and put it into fragment and insert into viewpager.
it works fine on sdk 22 below.
but as on android 23 it keep on saying
permission denial java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovioder.MediaContentProvider from ProcessRecord
which is refer to my code on line in fragment page
/*********************
bitmap = BitmapFactory.decodeStream(cr.openInputStream(uri), null, option);
which i put inside reSize() method
**********************/
i have trying to read develop console documents and notice we need to check permission and ask user for it.
my questions is
1. which permission should i ask, i have tried READ and WRITE
2. where should i surround the check permission for, it is outside the method? or just surround the line.
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
int hasPermission = checkSelfPermission(context,
Manifest.permission.READ_EXTERNAL_STORAGE);
if (hasPermission != PackageManager.PERMISSION_GRANTED) {
requestPermissions(
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},
RESULT_PERMS_INITIAL);
} else {
bitmap = BitmapFactory.decodeStream(cr.openInputStream(uri), null, option);
}
} else {
bitmap = BitmapFactory.decodeStream(cr.openInputStream(uri), null, option);
}
and on request for result
public void onRequestPermissionsResult(int requestCode,
String[] permissions,
int[] grantResults) {
if (requestCode == RESULT_PERMS_INITIAL) {
if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
bitmap = resizeBitmap(uri, getActivity().getApplicationContext());
}
else {
Toast.makeText(context, "error", Toast.LENGTH_SHORT).show();
}
}
else {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
For API-23 Android introduced new permission types. You should read this.
For the example please follow these page
RuntimePermissionsBasic
RuntimePermissions
I hope, it will work for you.
I am trying to update both the state and value of an attribute for an entity by writing plugin for CRM 2013. I did try to set the state of an activity using setStateRequest but I am not sure if we can update attribute value as well. I've registered the plugin on Merge message to change the state of an activity. How can I update an attribute value along with state change? Here is my code so far for state ch
protected void ExecutePreCaseMerge(LocalPluginContext localContext)
{
if (localContext == null)
{
throw new ArgumentNullException("localContext");
}
// TODO: Implement your custom Plug-in business logic.
IPluginExecutionContext context = localContext.PluginExecutionContext;
IOrganizationService service = localContext.OrganizationService;
//The InputParameters collection contains all the data passed in the message request.
if (context.InputParameters.Contains("SubordinateId") &&
context.InputParameters["SubordinateId"] is Guid)
{
try
{
Guid subordinateId = (Guid)context.InputParameters["SubordinateId"];
var fetch = #"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
<entity name='task'>
<attribute name='new_issuephase' />
<filter type='and'>
<filter type='and'>
<condition attribute='regardingobjectid' operator='eq' uitype='incident' value='" + subordinateId + #"' />
<condition attribute='statecode' operator='eq' value='0' />
</filter>
</filter>
</entity>
</fetch>";
EntityCollection ec = service.RetrieveMultiple(new FetchExpression(fetch));
if (ec.Entities.Count > 0)
{
// Create an ExecuteMultipleRequest object.
ExecuteMultipleRequest requestWithResults = new ExecuteMultipleRequest()
{
// Assign settings that define execution behavior: continue on error, return responses.
Settings = new ExecuteMultipleSettings()
{
ContinueOnError = false,
ReturnResponses = true
},
// Create an empty organization request collection.
Requests = new OrganizationRequestCollection()
};
foreach (var item in ec.Entities)
{
SetStateRequest setStateRequest = new SetStateRequest();
setStateRequest.EntityMoniker = new EntityReference("task", item.Id);
setStateRequest.State = new OptionSetValue(2);
setStateRequest.Status = new OptionSetValue(6);
requestWithResults.Requests.Add(setStateRequest);
}
ExecuteMultipleResponse responseWithResults =
(ExecuteMultipleResponse)service.Execute(requestWithResults);
}
}
ange.
Thanks for any help!
You must do the update as a separate request but you can execute it together with the SetStateRequests inside the same ExecuteMultipleRequest:
foreach (var item in ec.Entities)
{
SetStateRequest setStateRequest = new SetStateRequest();
setStateRequest.EntityMoniker = new EntityReference("task", item.Id);
setStateRequest.State = new OptionSetValue(2);
setStateRequest.Status = new OptionSetValue(6);
requestWithResults.Requests.Add(setStateRequest);
//New Code
item.Attributes["attributetobeupdated"] = "Updated Value";
UpdateRequest request = new UpdateRequest() { Target = item };
requestWithResults.Requests.Add(request);
}
ExecuteMultipleResponse responseWithResults =
(ExecuteMultipleResponse)service.Execute(requestWithResults);
Note that if any of the requests fail the ExecuteMultipleRequest will not throw an error but will return the details of the individual failures within the ExecuteMultipleResponse. It seems that a common reason for this operation failing is that by default SQL server queries are configured to time out after 30 seconds. More info here:
http://manyrootsofallevilrants.blogspot.in/2012/09/ms-crm-2011-timeout-settings-and-limits.html
What i'm trying to do is to test if a role is affected to a user or not, the method (fig 1 ) which test is exposed with WCF Data Service, and i'm trying to call it (fig 2 ) from the client side. the call is correct because i tested a simple test which returns and i got what i want it to send but when i change the body of the method to send me wheter the user is in a role or not, it thows an exception ( dataservicequeryexception )
fig1:
[WebGet]
public bool Controler(string role, string user)
{
if(Roles.IsUserInRole(user,role))
{ return true; }
return false;
}
fig2:
Uri u = new Uri(string.Format(LogIn.ctx.BaseUri + "/Controler?role='{0}'&user='{1}'",
"Serveur","Oussama"), UriKind.RelativeOrAbsolute);
IEnumerable<bool> result = LogIn.ctx.Execute<bool>(u);
bool res = result.Single();
if (res == true)
{
Response.Redirect("Index.aspx");
}
else
{
Response.Redirect("Error.aspx");
}
thanks everyone !
How do I use crossdomain with ftp?
I am trying to do a "hello world" level test of FTP in Flex, but for three days now, I cannot overcome the issue with how to coerce flex into accepting my crossdomain policy - even for testing purposes.
Here is my code: The exact error text follows.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize="onInitialize()" layout="vertical">
<mx:Script>
<![CDATA[
import mx.utils.*;
import mx.controls.Alert;
private var fileRef:FileReference;
private var fileSize:uint;
private var fileContents:ByteArray;
//you need to initiate two scokets one for sending
//commands and second for sending data to FTP Server
//socket for sending commands to FTP
private var s:Socket
//responce from FTP
private var ftpResponce:String;
//socket for sending Data to FTP
private var dataChannelSocket:Socket;
//responce from FTP when sending Data to FTP
private var dataResponce:String;
//will hold the IP address of new socket created by FTP
private var dataChannelIP:String;
//will hold the Port number created by FTP
private var dataChannelPort:int;
private var user:String="I have the right user"; //FTP usernae
private var pass:String="the pw is correct"; //FTP Password
private function receiveReply(e:ProgressEvent):void {
ftpResponce=s.readUTFBytes(s.bytesAvailable)
var serverResponse:Number=Number(ftpResponce.substr(0, 3));
if (ftpResponce.indexOf('227') > -1) {
//get the ip from the string response
var temp:Object=ftpResponce.substring(ftpResponce.indexOf("(") + 1
, ftpResponce.indexOf(")"));
var dataChannelSocket_temp:Object=temp.split(",");
dataChannelIP=dataChannelSocket_temp.slice(0, 4).join(".");
dataChannelPort=parseInt(dataChannelSocket_temp[4]) * 256 +
int(dataChannelSocket_temp[5]);
//create new Data Socket based on dataChannelSocket and dataChannelSocket port
dataChannelSocket=new Socket(dataChannelIP, dataChannelPort);
dataChannelSocket.addEventListener(ProgressEvent.SOCKET_DATA, receiveData);
}
//few FTP Responce Codes
switch (String(serverResponse)) {
case "220":
//FTP Server ready responce
break;
case "331":
//User name okay, need password
break;
case "230":
//User logged in
break;
case "250":
//CWD command successful
break;
case "227":
//Entering Passive Mode (h1,h2,h3,h4,p1,p2).
break;
default:
}
//for more please
//http://http://www.altools.com/image/support/alftp/ALFTP_35_help/
//FTP_response_codes_rfc_959_messages.htm
traceData(ftpResponce);
}
private function receiveData(e:ProgressEvent):void {
dataResponce=dataChannelSocket.readUTFBytes(
dataChannelSocket.bytesAvailable);
traceData("dataChannelSocket_response—>" + dataResponce);
}
private function showError(e:IOErrorEvent):void {
traceData("Error—>" + e.text);
}
private function showSecError(e:SecurityErrorEvent):void {
traceData("SecurityError–>" + e.text);
}
private function onInitialize():void {
Security.loadPolicyFile("http://www.myUrlIsCorrectInMyProgram.com/crossdomain.xml");
}
private function createRemoteFile(fileName:String):void {
if (fileName != null && fileName != "") {
s.writeUTFBytes("STOR " + fileName + "\n");
s.flush();
}
}
private function sendData():void {
fileContents=fileRef.data as ByteArray;
fileSize=fileRef.size;
dataChannelSocket.writeBytes(fileContents, 0, fileSize);
dataChannelSocket.flush();
}
//initialize when application load
private function upLoad():void {
fileRef=new FileReference();
//some eventlistener
fileRef.addEventListener(Event.SELECT, selectEvent);
fileRef.addEventListener(Event.OPEN, onFileOpen);
//this function connects to the ftp server
connect();
//send the usernae and password
this.userName(user);
this.passWord(pass);
//if you want to change the directory for upload file
this.changeDirectory("/test/"); //directory name
//enter into PASSV Mode
s.writeUTFBytes("PASV\n");
s.flush();
}
private function onFileOpen(event:Event):void {
}
private function traceData(event:Object):void {
var tmp:String="================================\n";
ta.text+=event.toString() + "\n";
ta.verticalScrollPosition+=20;
}
private function ioErrorEvent(event:IOErrorEvent):void {
Alert.show("IOError:" + event.text);
}
private function selectEvent(event:Event):void {
btn_upload.enabled=true;
filename.text=fileRef.name;
fileRef.load();
}
private function uploadFile():void {
createRemoteFile(fileRef.name);
sendData();
}
private function connect():void {
s=new Socket("ftp.myUrlIsCorrectInMyProgram.com", 21);
s.addEventListener(ProgressEvent.SOCKET_DATA, receiveReply);
s.addEventListener(IOErrorEvent.IO_ERROR, showError);
s.addEventListener(SecurityErrorEvent.SECURITY_ERROR, showSecError);
s.addEventListener(Event.CONNECT, onSocketConnect);
s.addEventListener(Event.CLOSE, onSocketClose);
s.addEventListener(Event.ACTIVATE, onSocketAtivate);
}
private function onSocketConnect(evt:Event):void {
//traceData("OnSocketConnect–>"+evt.target.toString());
}
private function onSocketClose(evt:Event):void {
//traceData("onSocketClose–>"+evt.target.toString());
}
private function onSocketAtivate(evt:Event):void {
//traceData("onSocketAtivate–>"+evt.target.toString());
}
private function userName(str:String):void {
sendCommand("USER " + str);
}
private function passWord(str:String):void {
sendCommand("PASS " + str);
}
private function changeDirectory(str:String):void {
sendCommand("CWD " + str);
}
private function sendCommand(arg:String):void {
arg+="\n";
s.writeUTFBytes(arg);
s.flush();
}
]]>
[SWF] /FTP-debug/FTP.swf - 739,099 bytes after decompression
Warning: Domain www.myUrlIsCorrectInMyProgram.com does not specify a meta-policy. Applying default meta-policy 'master-only'. This configuration is deprecated. See http://www.adobe.com/go/strict_policy_files to fix this problem.
Warning: Timeout on xmlsocket://ftp.myUrlIsCorrectInMyProgram.com:843 (at 3 seconds) while waiting for socket policy file. This should not cause any problems, but see http://www.adobe.com/go/strict_policy_files for an explanation.
Warning: [strict] Ignoring policy file at xmlsocket://ftp.myUrlIsCorrectInMyProgram.com:21 due to incorrect syntax. See http://www.adobe.com/go/strict_policy_files to fix this problem.
* Security Sandbox Violation *
Connection to ftp.myUrlIsCorrectInMyProgram.com:21 halted - not permitted from http://localhost/FTP-debug/FTP.swf
Error: Request for resource at xmlsocket://ftp.myUrlIsCorrectInMyProgram.com:21 by requestor from http://localhost/FTP-debug/FTP.swf is denied due to lack of policy file permissions.
The "Information" at the URL's listed above is categorically unintelligable to me.
Please, someone help!
I also had the same issue but was able to fix it using the flash policy server that I downloaded from http://www.flash-resources.net/download.html.
I ran this on the same machine that I have my tomcat server installed and made the call
Security.loadPolicyFile("xmlsocket://:843");
from the application and it worked perfectly. No errors.
I also had the same issue but was able to fix it using the flash policy server that I downloaded from here.
I ran this on the same machine that I have my tomcat server installed and made the call
Security.loadPolicyFile("xmlsocket://Machine Name:843");
from the application and it worked perfectly. No errors.
Watch the typo around the Machine Name in the last post.
See the crossdomain spec:
http://learn.adobe.com/wiki/download/attachments/64389123/CrossDomain_PolicyFile_Specification.pdf?version=1
This covers the warning you have and can help you get this working.